how to make a session using drizzle
this is how we make a session using postgress , i wanted to know how will we do that using drizzle-postgress
import express from 'express';
import session from 'express-session';
import genFunc from 'connect-pg-simple';
const PostgresqlStore = genFunc(session);
const sessionStore = new PostgresqlStore({
conString: '<insert-connection-string-here>',
});
const app = express();
app.use(express.json());
app.use(session({
secret: 'secret',
resave: false,
saveUninitialized: false,
cookie: cookieOptions, // define cookieOptions
store: sessionStore
}));