expressbooksapp

rest api book project

Usage no npm install needed!

<script type="module">
  import expressbooksapp from 'https://cdn.skypack.dev/expressbooksapp';
</script>

README

RESTful Express Books App

Build Status Coverage Status

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