gbowne1 / RadioLogger

A Radio Logging application build with NodeJS and ExpressJS
GNU General Public License v3.0
6 stars 6 forks source link

require.secret deprecated by express-session #36

Closed gbowne1 closed 1 year ago

gbowne1 commented 1 year ago

Nodemon reports this issue:

$ npm start

> radiologger@1.0.0 start
> nodemon index.js

[nodemon] 2.0.22
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js server.js`
express-session deprecated req.secret; provide secret option middlewares/session.middleware.js:4:18
node:events:505
      throw er; // Unhandled 'error' event
      ^
jzunigarce commented 1 year ago

Are you add to .env file the key SESSION_SECRET?

gbowne1 commented 1 year ago

No I did not do that. What would be the value?

jzunigarce commented 1 year ago

It is the secret for the session, you can put any value

gbowne1 commented 1 year ago

ah ok. :heavy_check_mark:

gbowne1 commented 1 year ago

some part of me wonder if we can generate a key.

https://github.com/expressjs/session/issues/734