shared module
is a shared and global module that other modules depend on in default.
TypeScript server project based on Nest framework
- mysql mysql client
- typeorm database object storage framework
- redis redis client
- redis-lock redis key lock
- rxjs JavaScript responsive programming
- socket.io-client socket.io for nodejs client
- socket.io-redis socket.io for redis client
- class-transformer JSON to object, used with reflect-metadata
- class-validator validation framework
- rimraf The UNIX command rm -rf for nodejs
- winston log framework for nodejs
yarn install
# basic mode
$ yarn start
# watch mode
$ yarn start:dev
# debug/watch mode
$ yarn start:debug
# production mode, remember to execute `yarn build` before running
$ yarn start:prod
# you can use `pnpm` or `npx`, the examples below use `pnpm`.
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
See env/.env.defaults for more details
You can create a .env.development.local
file in the env
folder to define environment variables for local development. This file is typically ignored by Git
, so you can use it to store sensitive or environment-specific information that you don't want to commit to your repository.
If a variable is defined in both the .env.development.local
file and the .env.defaults
file, the value in the .env.development.local
file will take precedence. This allows you to override the default values for certain variables when developing locally, while still maintaining a set of default values that can be used in other environments.
process.env.NODE_ENV
enum: 'development' | 'production'
process.env.BACKEND_BASE_URL
default: http://localhost:8081/api/v1/
redis host
process.env.REDIS_HOST
redis port
process.env.REDIS_PORT
redis password
process.env.REDIS_PASSWORD
redis db
process.env.REDIS_DB
process.env.PORT
default: 3333
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。