- Clone the repository
$ git clone https://github.com/nishit-trootech/bookLibrary.git
- Install dependencies
$ cd bookLibrary/
$ npm install
- Configure variables
This project uses environment variables for configuration. To configure your environment, follow these steps:
Locate the .env.example
file in the root of the project and create a copy of .env.example
and name it .env
.
$ cp .env.example .env
- To run migration
- Install and run PostgreSQL on your machine through a Docker container
$ npm run migrate
- Running the app
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
.
├── README.md
├── package.json
├── database
│ └── migrations
│ └── ... all migration files
├── models
│ └── ... all model files
├── src
│ ├── main.ts
│ ├── app.controller.spec.ts
│ ├── app.controller.ts
│ ├── app.module.ts
│ ├── app.service.ts
│ ├── books
│ │ ├── dto
│ │ │ ├── create-book.dto.ts
│ │ │ └── update-book.dto.ts
│ │ │── books.controller.spec.ts
│ │ └── ... # feedback controller and service file
├── tsconfig.json
Navigate to localhost:3000/api-docs for Swagger