Closed pirmax closed 5 years ago
Will you use TypeORM or Mongoose? If you are trying to change typeorm you must take into account that the user session middleware is coupled to postgresql specifically the connect-pg-simple package you should look for a similar middleware in mongo, you can also have both databases mounted, without replacing the models of user and use another connection or other ORM for information only. in the main file you can see that middleware
// production ready session store
const pgSession = require('connect-pg-simple')(session);
server.use(session({
secret: process.env.SESSION_SECRET as string,
store: new pgSession({
conString: `postgres://${process.env.DB_USERNAME}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_DATABASE}`,
crear_interval: 60 * 60 // sec
}),
resave: false,
saveUninitialized: false,
rolling: true,
cookie: {
httpOnly: false,
maxAge: 60 * 60 * 1000 // msec
}
}));
I updated some codes today 👍
@pirmax Still the error happen?
ARK is an example of PostgreSQL, so I closed this issue.
Hi,
I tried to install MongoDB instead PG. I've this warning after NestJS logs:
I don't know why...