Express session setup

PHOTO EMBED

Thu Aug 19 2021 17:52:21 GMT+0000 (UTC)

Saved by @ExplodeMilk #typescript #express

import expressSession from 'express-session';
const app = express();

// Add this line
app.use(expressSession({
    secret: 'Tecky Academy teaches typescript',
    resave:true,
    saveUninitialized:true
}));
content_copyCOPY

npm install express-session @types/express-session