Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Restaurant List

A simple restaurant website built with Node.js and Express

login search-and-sort autofill

Features

  • Register via email, Facebook, or Google account
  • Login to see user's own restaurants
  • Click the restaurant to check its details
  • Search restaurants by name and category
  • Sort restaurants by name, rating, category and location
  • Create a restaurant with details autofilled by Google API
  • Edit the details of a restaurant
  • Delete a restaurant, come with a confirmation alert

Getting Start

  1. Please make sure it is installed Node.js (skip if already install)

  2. Open Terminal and Clone the project

git clone https://github.com/DannyHucc/my-restaurant-list.git
  1. Go to the folder where this project is stored
cd my-restaurant-list
  1. Install the required dependencies
npm install
  1. Install nodemon (skip if already install)
npm i -g nodemon
  1. Set environment variables in .env file according to .env.exp
mkdir .env
  1. Set PORT(number) to start the server
PORT=<your port>
  1. MONGODB_URI: Go to MongoDB to create an account and set MongoDB Atlas to get MONGODB_URI and modify the following parameters usernamepassworddatabase
MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.ngwexuq.mongodb.net/<database>?retryWrites=true&w=majority
  1. Install studio 3T to view and modify document data, build comprehensive queries, import and export data, among many other tasks

  2. Set your SESSION_SECRET(string)

SESSION_SECRET=<your secret>
  1. Facebook Login: You need to create an application on Facebook for Developers, and substitute the application ID and application secret into FACEBOOK_ID and FACEBOOK_SECRET respectively
FACEBOOK_ID=SKIP
FACEBOOK_SECRET=SKIP
  1. Facebook Login: set Domain name to use callback
FACEBOOK_CALLBACK=http://<Domain name>/auth/facebook/callback
  1. Google Login: You need to create an application on Google for Developers, and substitute the application ID and application secret into GOOGLE_ID and GOOGLE_SECRET and GOOGLE_API_KEY respectively and set domain name to use callback
GOOGLE_ID=SKIP
GOOGLE_SECRET=SKIP
GOOGLE_API_KEY=SKIP
  1. Google Login: set Domain name to use callback
GOOGLE_CALLBACK=http://<Domain name>/auth/google/callback
  1. Seed your database
npm run seed
  1. Execute successfully if seeing following message
mongodb connected!
done
restaurantSeeder done!
  1. Start the server
npm run dev
  1. Execute successfully if seeing following message
Express is listening on localhost:3000
mongodb connected!
  1. Now you can browse the website on
http://localhost:3000
  1. Test account
  1. Leave server
ctrl + c

Built With

  • Runtime: node @ 14.16.0
  • Framework: express @ 4.17.1
  • Database: mongoose @ 5.9.7
  • View Engine: express-handlebars @ 4.0.2
  • Check package.json for other dependencies

Author

DannyHucc 胡晉嘉

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages