Description

Simple Nest online library service.

To Do

  • Authentication & Authorization
  • View Catalog with available books
  • Book reservation
  • Book return
  • Book search
  • Book management for admin

Installation

$ npm install

Preparation

Before running the app in production mode, you need to create .env file in the root directory with the following variables:

Before running the app in development mode, you need to create .env.development file in the root directory with the following variables:

You can use a .env.example file as a template.

Variable Description
PORT Application port
DATABASE_NAME Database file name
JWT_SECRET JWT secret
JWT_EXPIRES_ID The time of JWT token lifetime

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Docker

You can use Docker to run the app.

Running this command will create a Docker container with the app.

Note: Docker uses environment variables to configure the app from .env file

$ docker-compose up -d

Api documentation

You can use Swagger UI to view the generated API documentation.

Just go to https://localhost:PORT/api/docs in your browser.

Tutorials and guides used in this project

Credentials

Made by @truehazker for StartBlock.