dependabot[bot] on npm_and_yarn
chore(deps): bump node-fetch fr… (compare)
shadowtime2000 on npm_and_yarn
shadowtime2000 on master
chore(deps): bump jsdom from 16… Merge pull request #174 from et… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump jsdom from 16… (compare)
shadowtime2000 on master
README.ms: Fix rawgit links Merge pull request #170 from To… (compare)
This is how I do it:
In my route... maybe after a login:
await req.flash('error', 'Something bad happened');
await req.flash('info', 'idk mehn, something happened sha');
await req.flash('success', 'Something good happened');
// bonus: I have this block in an app.use
// middleware so it captures all alerts for all routes
res.locals.alerts = {
info: await req.consumeFlash('info'),
error: await req.consumeFlash('error'),
success: await req.consumeFlash('success'),
};
Then in your template:
<% alerts.forEach(function(alert){ %>
<div>
<%= alert.message %>
</div>
<% }) %>
You can come up with something better that fits for usecase tho
let sessionStore = new session.MemoryStore;
const sessionConfig = {
secret: '[secret goes here]',
name: 'appname',
resave: true,
saveUninitialized: true,
store: sessionStore,
cookie : {
sameSite: 'strict', // THIS is the config you are looing for.
maxAge: 60000
},
secure: false
};
app.use(session(sessionConfig));
return res.render('pages/organization', {
user: req.user,
title: 'My Organizations',
organizations: orgDetails,
events: events,
errorMessages: await req.flash('error'),
infoMessages: await req.flash('info'),
successMessages: await req.flash('success'),
warningMessages: await req.flash('warning'),
dtFormat: require('dateformat')
});
I was wondering if anyone who uses the eta-vscode extension for language support in vscode would be able to tel me which version of vscode they're using. It seems it's incompatible with my version (1.45.1).
@simonlayfield :wave: Hey, I created eta-vscode
. I am running 1.54.3 and it seems to work fine for me