1.0.0 • Published 8 months ago
@plumes/sugar-common v1.0.0
Description
Sugar Backend Service
Prerequisite
- node >= 18.17.1
- docker >= 20
- docker-compose >= 1.25
Installation
# Install dependency packages
npm i yarn -g
docker network create -d bridge traefik-net
docker-compose up -d
yarn install
Running the app
# development
$ yarn start
# watch mode
$ yarn start:dev
Test
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
Postgresql migration
We choose flyway as the mysql migration tool, you can write sql files in directory of project/migrations
Mongo migration
We choose migrate-mongo as the mongo migration tool, you can write sql files in directory of project/migrations-mongo
Environment variable
.env.local file was github ignored, you can make a copy from .env file, and replaced the content with your variables for local develop | Environment | Env File | | ----------- | ---------- | | Test | .env | | Local | .env.local | | Staging | .env.stg |
Exceptions
Coding Style Guide
API Response Rule
1.0.0
8 months ago