koatty_demoKoatty演示与部署流程

koatty_demo 项目中,您需要按照以下步骤进行操作:

  1. 安装依赖:运行 yarn install
  2. 迁移资料:编辑项目 src/db.ts 配置数据源,并运行迁移命令。
  3. 在 macOS 环境下,使用以下命令安装 koatty_cli

bash

sudo npm i -g koatty_cli

npm run build && koatty migrate all

4. 启动开发服务器:

bash

npm run dev

5. 对于生产环境,使用 npm start 来启动应用,或者使用 pm2 进行部署:

bash

pm2 startOrGracefulReload pm2.json

6. 自动创建 API 文件。

7. 启动文档服务器并访问:http://localhost:3000/。

zip
koatty_demo-master.zip 预估大小:53个文件
folder
koatty_demo-master 文件夹
file
launch.json 548B
file
update.sql 7KB
file
package.json 1KB
file
apidoc.json 244B
file
tslint.json 2KB
file
.thinksrc 39B
file
LICENSE 11KB
folder
static 文件夹
folder
html 文件夹
file
index.html 279B
folder
src 文件夹
folder
config 文件夹
file
plugin.ts 1KB
file
db.ts 775B
file
middleware.ts 2KB
file
router.ts 665B
file
config.ts 2KB
file
groupType.json 500B
folder
aspect 文件夹
file
TestAspect.ts 306B
folder
model 文件夹
file
UserModel.ts 11KB
file
RoleDataModel.ts 1KB
file
GroupModel.ts 2KB
file
RoleModel.ts 3KB
file
RoleRuleModel.ts 3KB
file
App.ts 807B
folder
middleware 文件夹
file
ViewMiddleware.ts 392B
file
JwtMiddleware.ts 386B
folder
dto 文件夹
file
DataDTO.ts 542B
file
UserDTO.ts 2KB
file
RoleDTO.ts 1KB
file
GroupDTO.ts 2KB
folder
plugin 文件夹
file
ApolloPlugin.ts 389B
folder
controller 文件夹
folder
Admin 文件夹
file
IndexController.ts 934B
file
PublicController.ts 4KB
file
DataController.ts 7KB
file
RoleController.ts 6KB
file
GroupController.ts 6KB
file
UserController.ts 6KB
folder
Web 文件夹
file
WebIndexController.ts 742B
file
AdminController.ts 2KB
folder
service 文件夹
file
CommonService.ts 4KB
folder
Admin 文件夹
file
GroupService.ts 459B
file
PassportService.ts 5KB
file
RoleService.ts 472B
file
RbacService.ts 10KB
file
MenuService.ts 5KB
file
UserService.ts 3KB
file
DataService.ts 481B
folder
util 文件夹
file
tool.ts 2KB
file
request.ts 187B
file
page.ts 5KB
file
tsconfig.json 4KB
file
pm2.json 471B
file
.gitignore 87B
file
README.md 1KB
file
yarn.lock 199KB
folder
.vscode 文件夹
file
launch.json 728B
zip 文件大小:135.59KB