This repo is backend API server for library management system made with expressjs and mongoose.
- 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
- 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
fileMONGODB_URI
,JWT_SECRET
,PORT
-
Start the server
yarn dev
Note: Make sure to run MongoDB server in the background.
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.
If you have any feedback, please reach out at @theanujdev