A challenge for Ravn
Create the .env
file with cp .env.example .env
and fill up with your server configuration for production, as below:
PORT=3000
MODE=DEV
RUN_MIGRATIONS=false
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=user
POSTGRES_PASSWORD=secret
POSTGRES_DATABASE=awesomedb
Run the following command to install all node dependencies: npm i
or npm install
.
Generate ormconfig.json
file with: npm run typeorm
command.
Other typeorm commands:
# run migrations
$ npm run typeorm:migration:run
# generate new migration file
$ npm run typeorm:migration:generate <filename>
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov