I made a simple RESTful API for searching article title and content. I used Express and Mongoose.
Routes:
-
GET all articles : GET|http://localhost:3000/articles
-
POST an article : POST|http://localhost:3000/articles
- Need to set values for the title and the content key
-
DELETE all articles : DELETE|http://localhost:3000/articles
-
GET one article : GET|http://localhost:3000/articles/:articleTitle
-
Update one article :
-
PUT|http://localhost:3000/articles/:articleTitle
- Need to set values for the title and the content key
-
PATCH|http://localhost:3000/articles/:articleTitle
- Need to set values for the title or the content key
-
-
Delete one article: