API to create, read, update and delete books data in an array. Created to complete Backend for Beginners class in Dicoding Academy.
- clone this repository
- type
npm ito install npm - type
npm run startto start the API
- method: POST
- path: /books
- body:
{ "name": string, "year": number, "author": string, "summary": string, "publisher": string, "pageCount": number, "readPage": number, "reading": boolean }
- method: GET
- path: /books
- add query ?reading with 0 or 1 value to get books by reading status
- add query ?finished with 0 or 1 value to get books by finish status
- add query ?name with "name" value to get books contains "name"
- method: GET
- path: /books/{bookId}
- method: PUT
- path: /books/{bookId}
- body:
{ "name": string, "year": number, "author": string, "summary": string, "publisher": string, "pageCount": number, "readPage": number, "reading": boolean }
- method: DELETE
- path: /books/{bookId}