Nodejs implementation of Monacard. It uses JavaScript, is built with TypeScript. This is implemented with reference to the MonacardHub.
$ yarn install --frozen-lockfile
Start mysql DB for local.
// Start docker.
$ yarn docker:up
// initialize schema.
$ yarn init:db
Stop mysql DB.
$ yarn docker:down
Generate
$ yarn migration:generate
Run.
$ yarn migration:run
Revert previous migration.
$ yarn migration:revert
Show migration history.
$ yarn migration:show
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
When development or watch mode you can test api at http://localhost:3000/api
.
Worker is not nestjs application. So you can run it as just JavaScript or TypeScript script.
// example
$ yarn build
$ node ./dist/src/worker/app/read-new-monacard.js
// example
$ yarn build
$ node ./dist/src/worker/app/sync-ban-card-list.js
Create .env
file in root directory from .env.org
.
Hint: This application uses dotenv.
# prepare
$ yarn docker:up
$ yarn init:db
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
# lint by eslint
$ yarn lint
# format
$ yarn format
$ docker image build -t example/monacardjs:0.0.1 .