RESTful API for Teracube OTA updates built on Nest.
$ pnpm install# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
# generating migrations
$ pnpm run typeorm:migration:generate <name># unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:covEnvironment Variable (supports .env)
| Variable | Default | Choices | Required | Description |
|---|---|---|---|---|
| NODE_ENV | development |
development, ci, staging, production or demo |
Environment for Nodejs | |
| JWT_SECRET | Any string | Secret for encoding JWTs (Really keep this secret) | ||
| PREFIX | Any string | Prefix in front of every API route | ||
| INVITE | true |
true or false |
Require invites for registration | |
| PORT | 3000 |
Valid port value | Port to run this application on | |
| DATABASE_HOST | Valid hostname or IP address | Host of Postgres database | ||
| DATABASE_PORT | Valid port value | Port of Postgres database | ||
| DATABASE_USERNAME | Database username | Username of Postgres database | ||
| DATABASE_PASSWORD | Database Password | Password of Postgres database | ||
| DATABASE_DATABASE | Database name | Database mame | ||
| DATABASE_SSL | true |
true or false |
Use SSL to connect to database | |
| DATABASE_SYNCHRONIZE | false |
true or false |
Synchronize entities to database (shouldn't be used in production) | |
| DATABASE_MIGRATIONSRUN | true |
true or false |
Run missing migrations on start |