bradtraversy / node_passport_login

Node.js login, registration and access control using Express and Passport
1.74k stars 1.29k forks source link

app.use() require a middleware function #74

Closed shashwat0802 closed 4 years ago

shashwat0802 commented 4 years ago

I am running into the this error shown in the image I literally copy pasted the whole code and still I am running into this error

Screenshot 2020-06-20 at 9 20 04 PM
Shawn1912 commented 4 years ago

Try adding this line const app = express(); before the app.use() line.

shashwat0802 commented 4 years ago

@Shawn1912 thanks for your response but I found out what the error was and thought of mentioning it here I mistakenly installed 'express-sessions' which is the wrong package it is 'express-session' instead without the s