- Create Account and use it to utilize the website like creating a campgrounds and adding comments to a campground
- Add and remove, edit Campgrounds,
- Add and remove, edit Comments
user can add create campground with a price and give it a comment and description and an image, also a comments can be added to particular campground
There are three models are used listed below:
- User, where the user has the following attributes:
- username
- password
- resetPasswordToken
- resetPasswordExpires
- Campground, where the user has the following attributes:
- name
- image_url
- description
- comments
- user
- price
- Comment, where the user has the following attributes:
- author
- text
The front end 'client side' I have used ejs to make the connection between the server and the front-end more easier and reasonable. where we can get the data from the data base and pass it easily to the ejs file and use it. for more information how ejs works,syntax please visit ejs tutorials.
the backend end 'server side' was developed using nodejs and mongodb and using RestFul routes concepts in naming the routes all the code are well commented and documented for more information about how RestFul routes please visit RestFul Routes.
The package Passport was used to do the authentication process and hashing the passwords of the users, for more information about the package passport please visit here
Note:
- before starting make sure that you have node installed in your machine and mongodb
- open the terminal in the root directory and run
npm install
to install all the packages required to run this project on your local machine - finally in the terminal run the command
nodemon
andmongod
to get the database and the app running on port 3000 feel free to change the port number!