/live-app-backend

基于 nestjs 搭建的直播app后端,前端地址:https://github.com/coding-ax/live-app-frontend

Primary LanguageTypeScriptMIT LicenseMIT

Nest Logo

编辑文件

基于隐私问题需要创建如下文件
.env 文件

//.env
QINIU_ACCESS_KEY=七牛云access key
QINIU_SECRET_KEY=七牛云secret key
QINIU_SCOPE=应用名称
EMAIL_HOST=smtp.qq.com
EMAIL_PORT=465
EMAIL_SERVICE=qq
EMAIL_AUTH_USER=qq 邮箱地址
EMAIL_AUTH_PASSWORD=QQ smtp认证密码
LIVE_PULL_URL=live-app.pull.xgpax.top
LIVE_PUSH_URL=live-app.push.xgpax.top
APP_NAME=live-app
LIVE_PUSH_KEY=腾讯云直播key

ormconfig.json 文件

{
  "type": "mysql",
  "host": "localhost",
  "port": 3306,
  "username": "数据库用户",
  "password": "数据库密码",
  "database": "live_app",
  "entities": ["dist/**/*.entity{.ts,.js}"],
  "synchronize": true,
  "logging": true
}

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov