Saturday 15 February 2014

node.js - Add session support to express after setup -


I'm just starting to remove nodes and I forgot to enter the flag for session support < Can I run the above command without writing it on anything I've already added or changed or do I have to do something else?

This is not as obvious as adding a new dependency (stylus) for the package. Json and rerun $ npm installed

your express app Just add session middleware to JS file.

  App (Express cookieParser ()); App Use (express session ({secret: '1234567890 quarity'}));   

Make sure it comes after the express.cookieParser () call. Also, update secret to protect the value in a random string.

No comments:

Post a Comment