Welcome to the Book Directory API project! This project is designed to showcase the power and versatility of Node.js, Express.js, MYSQL, Sequelize, and Postman by creating an API that allows users to interact with a collection of books. With this API, you can search for a particular book, get a list of all books in alphabetical order, add new books to the directory, and delete books from the directory.
The objective of this project is to create a Book Directory API that demonstrates the use of Node.js, Express.js, MYSQL, Sequelize, and Postman. I have written useful comments in the code to help you understand the code better. By the end of this project, you will have a solid understanding of how to build APIs and how to interact with them using different methods.
To create this Book Directory API, we will be using the following technologies:
- Node.js
- Express.js
- MYSQL
- Sequelize ORM
- Postman
This Book Directory API will have the following features:
- Search for a particular book by name.
- Get a list of all books in alphabetical order.
- Add new books to the directory.
- Delete books from the directory.
To install and run this project on your local machine, you need to follow these steps:
- Clone this repository from Github.
- Install all the required dependencies by running
npm install
command in your terminal. - Create a MySQL database and update the credentials in the .env file.
- Start the server by running
npm start
command in your terminal. - You can test the API endpoints using Postman.
This Book Directory API will have the following API endpoints:
- GET: /api/:title - Search for a particular book by name.
- GET: /api/ - Get a list of all books in alphabetical order.
- POST: /api/ - Add a new book to the directory.
- PUT: /api/:title - Update a book in the directory.
- DELETE: /api/:title - Delete a book from the directory.
This Book Directory API project is a great way to learn about Node.js, Express.js, MYSQL, Sequelize ORM, and Postman. By creating this project, you will gain a solid understanding of how to build APIs and how to interact with them using different methods. We hope this project will be useful to you and help you in your journey to becoming a proficient developer.