theanujdev / library-api

Backend API server for library management system made with expressjs and mongoose.

Home Page:https://www.postman.com/theanujdev/workspace/anuj-org/collection/16358422-f6513050-94ab-48bb-b2a4-0ba453351475?action=share&creator=16358422

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library API (Backend)

Overview

This repo is backend API server for library management system made with expressjs and mongoose.

Features

  • Login students and teachers.
  • Register students and teachers.
  • Find student by name.
  • List all students
  • CRUD operations on books
  • Only teachers can Add, Update, and Delete books
  • Student can issue a book

Run Locally

  • Clone the project
git clone https://github.com/theanujdev/library-api
  • Go to the project directory
cd library-api
  • Install dependencies
yarn install
  • Create a new file .env. Copy all the content from .env.example and paste it into .env. Change the following environment variables in your .env file

    MONGODB_URI, JWT_SECRET, PORT

  • Start the server

yarn dev

Note: Make sure to run MongoDB server in the background.

Optimizations

Scalability is achieved through the use of best practises and project structure. Morgan logger is used for request logs, and all http errors are handled separately. For authentication, it uses bcrypt and JWT tokens. All fields are validated.

Feedback

If you have any feedback, please reach out at @theanujdev

Authors

License

MIT

About

Backend API server for library management system made with expressjs and mongoose.

https://www.postman.com/theanujdev/workspace/anuj-org/collection/16358422-f6513050-94ab-48bb-b2a4-0ba453351475?action=share&creator=16358422


Languages

Language:JavaScript 98.0%Language:Shell 1.9%Language:Procfile 0.1%