Skip to content

qqxs/koa-mvc-starter

Repository files navigation

koa-mvc-starter

build

Use

# 克隆仓库
git clone https://github.com/qqxs/koa-mvc-starter.git

# 安装依赖
pnpm install

# development run, nodemon run code
pnpm run dev

# development run, pm2 run code
pnpm run dev:pm2

# build ts -> js
pnpm run build

# production run, pm2 run dist
pnpm run serve

# prettier write
pnpm run fmt

views

渲染模版使用ejs

功能

  • MVC
  • Restfull API
  • JWT
  • mysql
  • log4js
  • Mysql
  • Redis
  • Cookie
  • Session
  • prettier
  • husky

信息格式

{
  "code": 0,
  "data": [],
  "msg": ""
}
{
  "code": 404,
  "msg": "this is error msg"
}