I am a creating my first app in express and I want a user to stay logged in when making changes in express. I am using postgres, and I tried using connect-pg-simple to achieve that (https://www.npmjs.com/package/connect-pg-simple). Here's the code in app.js:
const session = require('express-session');
app.use(session({
store: new (require('connect-pg-simple')(session))(),
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000 },
secret: 'secret',
resave: true,
saveUninitialized: true
}));
Anyways, I am getting this error and I couldn't find a solution: (Failed to prune sessions: relation "session" does not exist) P.S: I already created the session table in my database - psql mydatabase < node_modules/connect-pg-simple/table.sql