Closed psitronic closed 5 years ago
@psitronic , great job. however there are some typos in the code. relating to type
being tpye
in the model definitions
@psitronic when I run locally I get Error: secret option required for sessions
. Is something missing in (sample).env file?
For sessions you need SECRET = 'ourTopSecret' in .env. Later it can be a random number... I suppose to have it in order not to log in each time you leave a page.
@psitronic ok thanx. can you add it to the sample.env or just a temporary thing?
@psitronic oh hang on, we aren't loggin in yet - do we really need this? If we use passport later that will take care of auth.
Added the following DB models/schemas to the Models folder:
Added the session middleware.
Corresponding collections (including "sessions") will be created in the running DB process.env.MONGODB_URI automatically when the server starts (node server). The data base should already be created. To test I used a local DB on my laptop.
Dependencies were added: "connect-mongo": "^2.0.2", "express": "^4.16.4", "express-session": "^1.15.6", "mongoose": "^5.3.14"