I'm in the middle of making a login system, with nextJS, and Mysql. I wanted to use sessions to login the user, but don't know how to combine express-session
with NextJS
. My question is, can express-session
be used with NextJS
, if so how?
CodePudding user response:
Express-Session is a middleware for Express (it runs on the Express server.)
The best you can do is serve your NextJS application through the Express app, and use the Middleware to handle sessions.
Hope this helps :D