This API consists of 2 tables Authors and Books all values in there is being generated by faker.js and is used to perform operations between them.
Install project with npm on terminal
npm install
POST /api/login
POST /api/logout
Author has the following attributes:- name,password,email,phone,BooksLiked,books
To return the response of all the authors in the database with number of books published by that autho
GET /api/authors
GET /api/authors/:id
GET /api/authors/me
Books has the following attributes:- title,author,likes
To return the list of all the books.Remember that this url will need query parameter "asc" for ascending order sort and "desc" for descending order sort of likes.
GET /api/books?sort=(desc or asc)
PUT /api/books/like/:id
PUT /api/books/unlike/:id
To run this project, you will need to add the following environment variables to your .env file
ACCESS_TOKEN_SECRET=e75cb3acca9e971c85df4ad92c27a9e82d1592b2823e7e1fa9e16a028e39448c3fb40bf4b705ae3cde58a460127f2e57c8860db9bb5617eb8717a0c7ba2e8c9c