載入passport module,增加local login/facebook login功能,session機制,bcrypt hash code, flash message
install Node.js, this project use version V10.15.0
install MongoDB
git clone https://github.com/brendasy/Restaurant_list_passport.git
cd Restaurant_list_passport/
npm install
cd Restaurant_list_passport/
npm install -g nodemon
cd Restaurant_list_passport/models/seeds
node Seeder.js
Now you can check MongoDB if there are 2 users in users collection and each user has 3 restaurants data in restaurants collection under restaurant database.
If there are data in restaurant dbs, then you could go on the next step.
cd Restaurant_list_passport/
npm run dev
> nodemon app.js
[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node app.js`
Express is listening on localhost:3000
mongodb connected!
Enter the URL http://localhost:3001/ at browser
- nvm-windows - Node.js environment for windows OS
- nvm - Node.js environment for Linux / Mac OS
- cmder - Used to type cmd in windows OS
- MongoDB - Database server
- Brenda