Table of Contents
This is a RESTful API for managing books, built with Express.js and MongoDB. It allows users to sign up, login, create, delete, update, and view books. The API provides a simple and intuitive interface for managing a collection of books.
Technologies used
- Express js
- Mongoose
- Bcrypt
- Jsonwebtoken
- Dotenv
- Nodemon
To run this API on your local machine, make sure you have the following dependencies installed:
- Node.js (v14 or above)
- npm (Node Package Manager)
- MongoDB
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
- Clone the repo
git clone https://github.com/barakadanny/Books-library-api-nodejs.git
- Install NPM packages
npm install
- Start the server
npm start
User Endpoints
POST /auth/signup: Create a new user account.
POST /auth/login: Authenticate and log in the user.
GET /book: Retrieve a list of all books.
GET /book/:id: Retrieve a specific book by ID.
POST /book: Create a new book.
PUT /book/:id: Update an existing book by ID.
DELETE /book/:id: Delete a book by ID.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.