- Description
- Try it out
- Installation
- Configuration
- Running the app
- DB migrations
- Tests
- APIs docs
- Database schema
- Project structure tree
- Support
This repository build as monorepo and consist of ___ project:
- ...
- ...
Read more about project structure here.
Building with:
First of all, make sure you have installed the following software on your environment:
- Node.js version 14+
- PostgreSQL version 12+
$ git clone [email protected]:SP-OKO/smart_citi/iot-backend.git
$ cd nest-prisma-monorepo-template
$ npm install
Before the first running app configure your project environment variables:
# Development mode
$ npm run start:dev
# Production mode
$ npm run build
$ npm run start:prod
more scripts view in package.json
file.
WIP...
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
├─ apps - main project folder with monorepo apps (@see https://docs.nestjs.com/cli/monorepo#monorepo-mode)
│ ├─ main-api - main-api files in standard Nest api structure
| | └─ ...
│ └─ service-x - service-x files in standard Nest api structure
| └─ ...
├─ dist - folder with compiled *.js files (has same structure with /apps, /libs)
| └─ ...
├─ docs - api documents and assets
├─ database - database management files
│ ├─ _pgmigrations - db migrations files
│ ├─ _seeds - db seeds files (custom implementations with prisma runner)
| └─ sql - sql files and scripts
| schema.prisma - prisma schema file (https://www.prisma.io/docs/concepts/components/prisma-schema/)
├─ environment - app environment files (with same folder structure as apps/)
│ ├─ main-api - folder with main-api env files
| | .env - default main-api env file
| └─ service-x - folder with service-x env files
| .env - default service-x env file
| .env - default project env file (with db config and other used in all apps)
├─ libs - own libs sharing between monorepo apps
│ ├─ common - lib with common modules? configs and general nestjs entities files
| └─ prisma - custom prisma service wrapper
└─ node_modules - nodejs third-party libs and dependencies for current project
└─ ...
.eslintrc.js - eslint config
.gitignore - Git untracked files list
.prettierrc - prettier configuration file
.prettierignore - prettier ignored files list
nest-cli.json - nest-cli configuration file
ormconfig.example.js - example typeorm configuration file, used for working with migrations CLI
package.json - npm manifest file
package-lock.json - autogenerated file using by npm
README.md - project readme file
tsconfig.build.json - ts compiler build configuration
tsconfig.json - typescript compiler configuration
Find bug? - Report it: