GithubHelp home page GithubHelp logo

theanujdev / library-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 40 KB

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

Shell 1.87% JavaScript 98.00% Procfile 0.13%
expressjs http-errors javascript mongodb mongoose morgan postman bcrypt jwt jwt-auth validator

library-api's Introduction

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

library-api's People

Contributors

theanujdev avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.