Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pintu544/bookapis

Create Book app all of the crud operation
https://github.com/pintu544/bookapis

es6 expressjs mongodb mongoose nodejs

Last synced: 13 days ago
JSON representation

Create Book app all of the crud operation

Awesome Lists containing this project

README

        





Book Listing Web Application


A simple web application that allows users to view, add, and delete books. The application includes both frontend and backend functionality, allowing users to manage a list of books with fields for title, author, and description.


Features




  • View Books: Display a list of books with details (title, author, description).


  • Add Book: Add a new book by entering title, author, and description.


  • Delete Book: Remove a book from the list.


Tech Stack




  • Frontend: React.js, Tailwind CSS


  • Backend: Node.js, Express.js, MongoDB


  • Database: MongoDB Atlas (cloud database)


Backend (Node.js + Express.js + MongoDB)



  • API to get, add, and delete books.


Tech Stack




  • Node.js - Runtime environment


  • Express - Backend framework


  • MongoDB - Database


Setup and Installation


Installation


Backend




  1. Clone the repository:


  git clone https://github.com/pintu544/BookApis

cd BookApis

Install Dependencies


bash




npm install

Environment Variables


Create a .env file in the root directory and configure the following variables:

``

`PORT=5000

MONGO_URI=your_mongodb_connection_string


``


Running the Application


To start the server, run:


bash




`npm run dev`

The backend should be running at http://localhost:8000.


Live Demo


The live backend demo is available https://bookapis.onrender.com/api/v1/books


API Endpoints


Book Endpoints




  • POST /api/v1/books/createBook -Create Book


  • GET /api/v1/books - Get All Books


  • DELETE /api/v1/books/:id - delete Book


Project Structure


bash




BackendAuthSocket/
├── db/ # Configuration files (DB, JWT)
├── controllers/ # Functions handling requests
├── models/ # Mongoose models (Book Data)
├── routes/ # API routes
└── app.js # Main server entry point