/library-api

Simple API for library application using Node.JS and MongoDB

Primary LanguageTypeScriptMIT LicenseMIT

Forks Stargazers Issues MIT License LinkedIn


Logo

Simple Library API

An API for library application that allowed user to borrow and return books
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgments

About The Project

Library API is an API that created for a school or college library that wanted to create an application that have borrow and return books functionality for their user. This API also allowed their user to do authentication features, such as login and register, so, the library can just uses the API without implementing basic features again for the application.

back to top

Built With

Main technology used to built this application are listed below:

back to top

Getting Started

To get started with this project locally, follow below steps:

Prerequisites

Make sure you have package manager (either npm or yarn)

FYI: This project uses yarn as package manager, but you're free to use npm too.

Installation

Below steps will guide you through the local installation process of this application

  1. Get your MongoDB cloud connection at here
  2. Clone the repo
    git clone https://github.com/stanleyclaudius/library-api.git
    
  3. Install project dependency
    Make sure that your terminal pointing at the root directory of this project (library-api folder).
    yarn install
    
  4. Complete the .env variable
    Rename .env.example file at /config directory become .env, then fill the value for every key. Below is the guideline for filling the .env value:
    Key What To Fill Example Value
    PORT Your server port 5000
    MONGODB_URI Your MongoDB URL mongodb://user:user1234@main-shardxxxx
    ACCESS_TOKEN_SECRET Random complex string for JWT DUhxdx183)_--aACN#2%
    REFRESH_TOKEN_SECRET Random complex string for JWT 17hdjcD7ud(-*&732~
  5. Lastly, run below command at your terminal to spin off the application
    yarn run dev
    

back to top

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

back to top

License

Distributed under the MIT License. See LICENSE.txt for more information.

back to top

Contact

LinkedIn: Stanley Claudius

Project Link: https://github.com/stanleyclaudius/library-api

back to top

Acknowledgments

Special thanks to:

  • Othneildrew for providing an amazing README template.
  • Heroku for providing hosting service for this application.

back to top