Skip to content

notDPR/RESTful_Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful Blog

This project shows RESTful routing in a form of a simple Blog app.
Prototype : https://still-reef-69131.herokuapp.com

7 RESTful Routes

Name Path HTTP Verb Purpose Mongoose Method
Index /blogs GET List all blogs blog.find()
New /blogs/new GET Show new blog form N/A
Create /blogs POST Create a new blog, then redirect somewhere blog.create()
Show /blogs/:id GET Show info about one specific blog blog.findById()
Edit /blogs/:id/edit GET Show edit form for one blog blog.findById()
Update /blogs/:id PUT Update particular blog, then redirect somewhere blog.findByIdAndUpdate()
Destroy /blogs/:id DELETE Delete a particular blog, then redirect somewhere blog.findByIdAndRemove()

Resources Used

  • Embedded Javascript Templates : EJS
  • PUT and DELETE requests : Method-Override
  • Database : MongoDB
  • Database Hosting : mLabs
  • Front-end Framework : Semantic UI