This is an authentication app using Node.js, Express.js and the authentication middleware Passport.js, with MySQL database. The main advantage of using Passport.js is that users can view pages only after logging in successfully.
I found very less documentation for linking Passport.js with MySQL database, so I hope this helps.
The npm packages used are:
express
express-ejs-layouts(you can use handlebars or pug)
mysql
bcrypt(For hashing password)
flash(For flash messages)
express-session
passport-local
passport(For authentication during login)