1.0.0 • Published 3 years ago
expressbooksapp v1.0.0
RESTful Express Books App
This is a test RESTful app, that allows user to add, update, delete or view books using GET, POST, PUT and DELETE HTTP methods
Usage
- To add a book: POST + http://localhost:8000/books/
Req body:
{ "title": "title", "author": "author" }
- To update a book: PUT + http://localhost:8000/books/:id
Req body:
{ "title": "newTitle" }
- To delete a book: DELETE + http://localhost:8000/books/:id
- To view:
- all books: GET + http://localhost:8000/books/
- the specific book: GET + http://localhost:8000/books?title=title&author=author
- to set pagination: GET + http://localhost:8000/books?page=1&limit=5
Tests
npm test
1.0.0
3 years ago