##Add Mongoose
- Install and configure Mongoose
- Setup campground model
- Use campground model inside of our routes
#Show Page
- Review the RESTFUL routes we've seen so far
- Add description to our campground model
- Show db.collection.drop()
- Add a show route/template
RESTFUL ROUTES
INDEX /dogs GET Display a list of all dog NEW /dogs/new GET Display form to make a new dog CREATE /dogs POST Add new dog to DB SHOW /dogs:id GET Show info about dog.
#Refactoring Mongoose code.
- Create a models directory
- Use models.exports
- Require everything correctly
#Add Seeds.js file.
- Add a seeds.js file
- Run the seeds file every time the server starts
#Add the comment model!
- Make our errors go away.
- Display the comments on the campground show page.
- Discuss nested routes
- Add the comment new and create route
- Add the new comment form
- Install all packages needed for authentication
- Define User model.
- Configure passport
- Add register routes
- Add register template
- Add login route
- Add login template
- Add logout route
- Prevent user from adding a comment if not signed in
- Add links to navbar
- Login and sign up
- Logout
- Create a route directory.
- Create campground.js, comments.js and index.js files
- Move the respective routes to the files
- Associate users to comments
- save author's name to a comment automatically
- Add Method- Override
- Add Edit Route for Campgrounds
- Add Link to the Edit page
- Add Update Route
- Add Update Route
- Fix $set problem
- Add a Detroy route
- Add Delete button
- User can only edit his/her campgrounds
- User can only delete his/her campgrounds
- Hide/show edit and delete buttons
- Add a comment edit route
- Add an Edit button on the show page
- Add the a put route for updating comments
- Redirect to the show page of that campground.
- Add a delete route for comments
- Redirect to that particular campground
- Add a middleware to check comment ownership
- Link the middle to the update, edit and destroy routes
- Show/hide delete and edit buttons according to user authorization.
- Create a middleware directory
- Create an index.js.
- Refactor all middleware to the file.
- install and configure flash-connect
- set it in the urls.
- Configure the with bootstrap alerts