Skip to content

About

Backend REST API for booknook online library using Express.js, MongoDB, and JWT authentication.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

BookNook - Server API (Backend)

This is the backend REST API for the BookNook online library application. It handles database operations, book borrowing logic, and JWT-protected routes using Express.js and MongoDB.

🔗 Live Server URL

⚙️ Key Features & APIs

  • Express.js & MongoDB: High-performance backend utilizing MongoDB Atlas for data storage.
  • JWT Protection: Secure API endpoints using jose library for JSON Web Token (JWT) validation middleware.
  • Book Management: APIs for creating, reading, updating, and deleting (CRUD) books.
  • Borrow Logic: Handles book borrowing with $inc operators to manage available copies automatically.
  • No Double Borrow: Prevents users from borrowing the same book multiple times simultaneously.

🛠️ Tech Stack

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB (Native Driver)
  • Security: JWT (jose), CORS

🚀 How to Run Locally

  1. Clone the repository: git clone <your-server-repo-link>
  2. Install dependencies: npm install
  3. Create a .env file with PORT, MONGODB_URI, and BETTER_AUTH_URL.
  4. Run the server: npm run dev or node index.js

About

Backend REST API for booknook online library using Express.js, MongoDB, and JWT authentication.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages