A Simple Blog RestAPI
- You need to have Node and NPM installed on your computer.
- Installing Node automatically comes with npm.
- Clone this project to your local machine
https://github.com/iphyokafor/Blog_api.git
- Installing the project dependencies
Run the command below
$ npm install
- Start your node server
run the command below
$ npm run dev start
- Use
http://localhost:5050
as base url for endpoints
METHOD | DESCRIPTION | ENDPOINTS |
---|---|---|
POST | Add a post | /api/posts |
GET | Get all the post | /api/posts |
PATCH | Update the details of a post | /api/posts/:postId |
GET | Get a particular post | /api/posts/:postId |
DELETE | Remove a post | /api/posts/:postId |
- Run test for user authentication
run the command below
$ npm run test