A website built with Node.js, Express.js, and MongoDB for you to keep all your favorite restaurants with restaurant's name, address, phone, image, category, rating, and so on.
Please register an account via email address first, or you may quick login with Facebook & Google, cause all the restaurant list would be only keep in your own account.
🌟 To try this project, you could use the dummy data to login.
🌟 This project is deployed on HEROKU as well !!!
- REGISTER: sign up an account with name, email, password
- LOGIN: sign in to review your own restaurant list
- LOGIN with 3rd-party account: quick login with Facebook or Google account
- LOGOUT: sign out the account by clicking the logout button
- CREATE: write down the restaurant info at the create page
- READ: review your full restaurant list at the home page
- READ: get the restaurant's detail info by clicking the detail button
- UPDATE: you may update the info whenever you want by clicking the edit button
- DELETE: you can remove the restaurant from your list by clicking the delete button
- SEARCH: there's a search bar at the home page for you to search the specific restaurants by keyword or location
- SORT: sort the restaurant list in ascending or descending order by name
- FILTER: filter the restaurant list by category or rating
- Clone the files to your computer
git clone https://github.com/wentingliuu/restaurant-list-login.git
- Init: install the npm packages
cd restaurant-list-login
npm install
- Create .env file and store API Key in the file
touch .env
- Please see .env.example for reference.
- Please get your own Facebook & Google API key from Facebook & Google
- Run MongoDB Server
cd ~/mongodb/bin/
./mongod --dbpath <path to mongodb-data directory>
- While the terminal shows
waiting for connections on port 27017
, MongoDB has started successfully.
- Insert seeder
npm run seed
- Run the project
npm run dev
- While the terminal returns
Express is listening on localhost:3000
, please visit http://localhost:3000 on your browser.
After inserting the seeder, you may use the following dummy data to experience this web application.
Password | Restaurant List | |
---|---|---|
user1@example.com | 12345678 | #1, #2, #3 |
user2@example.com | 12345678 | #4, #5, #6 |
root@example.com | 12345678 | #1, #2, #3, #4, #5, #6, #7, #8, #9 |
- Visual Studio Code - development environment
- Node.js & npm - JavaScript runtime environment
- Express.js - web application framework
- Express-Handlebars - template engine
- MongoDB - document-oriented database
- Mongoose - MongoDB object modeling tool(OBM)
- body-parser - middleware
- method-override - middleware
- express-session - middleware
- passport - authentication middleware for Node.js
- bcrypt.js - middleware
- Facebook for Developer - get APP_ID & APP_SECRET for passport-facebook
- Google Developers Console - get CLIENT_ID & CLIENT_SECRET for passport-google