- Nest js
- PostgreSQL database, or Docker
$ yarn
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
Edit database connection params in ormconfig.json
file.
$ docker-compose -f docker-compose.base.yaml -f docker-compose.dev.yaml up -d
# Or if you want to use the prod env
$ docker-compose -f docker-compose.base.yaml -f docker-compose.prod.yaml up -d
You may edit the following environment variables in .env
:
Variable | Default value | Description |
---|---|---|
TYPEORM_HOST |
postgres |
Postgres server hostname |
TYPEORM_PORT |
5432 |
Postgres server port |
TYPEORM_USERNAME |
postgres |
Postgres database username |
TYPEORM_PASSWORD |
postgres |
Postgres database password |
TYPEORM_DATABASE |
test |
Postgres database name |
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
You can run TypeORM operations using this syntax
# exemple with schema:sync
$ yarn typeorm schema:sync
Play the game of Hex (or Con-Tac-Tix) on the console (game presentation, rules).
- Node.js
yarn
yarn start:cli
yarn start:cli -s 9
yarn start:cli -f config.json
With config.json at the root of the project. Example of content :
[
[
{
"value": 1
},
{
"value": null
}
],
[
{
"value": null
},
{
"value": 2
}
]
]
## Re-run the script on change
yarn dev:cli
## typecheck && compile
yarn build
## format
yarn format
## test
yarn test