Restaurant list created using node.js, mongodb and framework express.
- User Register
- User login / logout
- User Facebook login
- List all restaurants.
- Show restaurant detail.
- Search restaurant by name or category.
- New a restaurant,
- Edit a restaurant information.
- Delete a restaurant.
- Sorting Restaurants by Name or Rating.
- Clone the Repo to local server.
git clone https://github.com/paulwu-tw/restaurants.git
- Install need package by follow cmd.
npm install
- Accroding to .env.example file, config required info below.
# Mongo db connect info
MONGODB_URI=<Your own connection string>
MONGODB_USER=<Username>
MONGODB_PASSWORD=<Password>
# Session secret
SESSION_SECRET=<YOUR_SESSION_SECRET>
# Facebook App info
FACEBOOK_ID=SKIP
FACEBOOK_SECRET=SKIP
- Create test data
npm run seed
-
seed offer 2 account below
Name Email Password 1 user1 [email protected] 12345678 2 user2 [email protected] 12345678
- Start server for demo.
npm run start
- While see the message below, open browser and enter the following URL.
Listen on http://localhost:3000
- Stop server
cmd + c
- Node.js: 18.15.0
- MongoDB Altas
- Express: 4.18.2
- Express-handlebars: 7.0.7
- mongoose: 7.1.0
- dotenv: 16.0.3
- express-session: 1.17.3
- passport: 0.6.0
- passport-local: 1.0.0
- passport-facebood: 3.0.0
- bcryptjs: 2.4.3