Programmer Blog: https://programmerblog.net/
Source code for article on NodeJS PassportJS login with MySQL.
You can read detailed tutorial on our blog: http://programmerblog.net/nodejs-passport-login-mysql/
Install MySQL and PHPMyAdmin
1. Create a database db_users.
2. Create a database table for tbl_users and insert sample data into the table.
Install NodeJS, Express Generator
1. Generate a NodeJS, Express Application using Express Generator.
2. Install required modules using NPM.
```
npm install connect-flash
npm install passport
npm install passport-local
npm install express-session
npm install memory
npm install crypto
npm install mysql
```
Create a NodeJS passportJS login script with MySQL.
Read More at: http://programmerblog.net/nodejs-passport-login-mysql/
MySQL Script for Creating Database and Users table with sample data is attached with this code.
You can find SQL file in database directory.