Install dependencies:
$ npm install
Startup the Server:
$ npm start
Run Tests:
$ npm run test
Method | Endpoint | Description |
---|---|---|
GET | /api/v1/posts | List all posts |
GET | /api/v1/posts/:postId | Query one post |
POST | /api/v1/posts | Create a new post |
PUT | /api/v1/posts/:postId/publish | Publish a new post |
PUT | /api/v1/posts/:postId/unpublish | Unpublish a post |
DELETE | /api/v1/posts/:postId | Delete a post |