Cart-order-deliver API example

Installation

$ npm install

Running the app

  • Run docker-composed database:

docker-compose up

Access psql database on port 5433 (default) and/or adminer at port 8080 (default)

  • Run the application
# copy .env.example to .env and provide database configuration
$ cp .env.example .env

# if your default nodeJS version is not v12.17.0
$ nvm use 

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Application will be available on port 3000 (default)

Release

# for first release. Create tag and changelog, but skip version bumping
$ npm run first-release

# tag, changelog and version bump
$ npm run release

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov