Backend API supporting Adastry.io, the Swagger OpenApi docs can be found at api.adastry.io.
The Adastry API is built on top of the Nest framework TypeScript starter repository.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
Not implemented yet.
To prevent production data lost, database schema synchronization is disabled by default. To enable entities auto-synchronization, set the node environment to the following:
NODE_ENV=development
Integrity check is skipped when env SKIP_INTEGRITY_CHECK
have the string value yes
. String value is used instead of
boolean for dotenv compatibility.
Initial sync is skipped when env SKIP_INIT_SYNC
have the string value yes
. String value is used instead of
boolean for dotenv compatibility.
Data Sync at startup or scheduled cronjob is skipped when env SKIP_SYNC
have the string value yes
. String value is used instead of
boolean for dotenv compatibility.
Since he TypeORM cli cannot read from the Nest app configuration, it requires a datasource file named typeOrm.config.ts
located at the project root.
Note: The nestJs autoLoadEntities feature won't work here, therefore entities need to be manually registered.
npm run typeorm schema:log -- -d typeOrm.config.ts
npm run typeorm schema:sync -- -d typeOrm.config.ts
If you need to pass parameter with dash to npm script, you will need to add them after --. For example, if you need to generate, the command is like this:
$ npm run typeorm migration:generate -- -n migrationNameHere