Skip to content

Latest commit

 

History

History
31 lines (30 loc) · 1.2 KB

README.md

File metadata and controls

31 lines (30 loc) · 1.2 KB

Karma-Trials--Rest-API

REST API that contains Books, Authors and Reviews.
Every Book has an Author. Authors can have many Books. Books can have many reviews.
API is able to create, read, modify, and delete Books, Authors, and Reviews.


#To Run this :
You must install node
After downloading and installing node, create the table as per the command in SQL COMMANDS.txt
Then go to project folder in terminal and type node server.js.

API Routes :
GET /book - Get all Books
GET /book?authorID=x - Get All Books of authorID x
GET /book/:bookid - Get one Book
POST /book - Create Book
PUT /book/:bookid - Update Book
DELETE /book/:bookid - Delete Book

GET /author - Get all Author
GET /author/:authorid - Get one Author
POST /author - Create Author
PUT /author/:authorid - Update Author
DELETE /author/:authorid - Delete Author

GET /review - Get all Review
GET /review?bookId=x - Get All reviews of Book x
GET /review/:reviewid - Get one Review
POST /review - Create Review
PUT /review/:reviewid - Update Review
DELETE /review/:reviewid - Delete Review