- Responsive web design (RWD)
- User Authentication and Authorization
- Flash messages responding to user interaction
- RESTful API
-------------------------------------------------------------------------
User Routes
-------------------------------------------------------------------------
[Method] [Route]
GET / Landing page
GET /login Request the user login page
GET /logout Request the user logout page
GET /register Request the user edit page
-------------------------------------------------------------------------
Campground Route
-------------------------------------------------------------------------
[Method] [Route]
GET /campgrounds Fetch all campgrounds
GET /campgrounds/new Request the campground adding page
GET /campgrounds/:id Show the campground information
PUT /campgrounds/:id Update campground information (all)
PATCH /campgrounds/:id Update campground information (part)
DELETE /campgrounds/:id Delete a campground
GET /campgrounds/:id/edit Request the campground editing page
-------------------------------------------------------------------------
Review Route
-------------------------------------------------------------------------
[Method] [Route]
POST /campgrounds/:id/reviews Create a new review
DELETE /campgrounds/:id/reviews/:rid Delete review
- Bootstrap - Powerful, extensible, and feature-packed frontend toolkit
- Node.js - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express - Fast, unopinionated, minimalist web framework for Node.js
- MongoDB - NoSQL database for modern applications
- Mongoose - Elegant MongoDB object modeling for Node.js
- Passport - Simple, unobtrusive authentication for Node.js
- EJS - Embedded JavaScript templating engine
Step1. Clone this repository.
$ git clone https://github.com/haribo0915/yelpcamp.git
Step2. Install dependencies via NPM.
$ cd yelpcamp
$ npm install
Step3. Create free acounts on the following services:
- Cloudinary: image storage
- Mapbox: map api
Step4. Please reference ".env-example" file to create ".env" file under the root directory of the project:
CLOUDINARY_CLOUD_NAME=<cloudinary_cloud_name>
CLOUDINARY_KEY=<cloudinary_key>
CLOUDINARY_SECRET=<cloudinary_secret>
DB_URL=<url>
SECRET=<salting_secret>
MAPBOX_TOKEN=<mapbox_token>
PORT=<port>
Step5. Run the web server and open a browser to visit http://localhost:8080/.
$ npm start