Skip to content

Latest commit

 

History

History
executable file
·
62 lines (38 loc) · 1.49 KB

README.md

File metadata and controls

executable file
·
62 lines (38 loc) · 1.49 KB

changelog

wiki 有一些截图,方便查看

see CHANGELOG.v2.md or wiki

使用

方式一

  1. git clone https://github.com/gozeon/yapii.git --depth 1 or 下载项目
  2. npm install --production 报错点这里
  3. 修改 config.json 配置文件
  4. pm2 start server/app.js --name yapii

这是部署方式,如果你在本地启动,直接运行npm start or node server/app.js

日志管理建议使用 pm2-logrotate

方式二

适合从旧的yapi迁移到

  1. 修改 config.json 配置文件
  2. docker build . -t yapii
  3. docker run --rm -it -d -p 4000:4000 yapii

方式三(推荐)

一键部署,需要注意数据库的备份

  1. 修改 config.json 配置文件
  2. docker compose up -d
  3. 设置系统管理员 docker compose run --rm yapii node server/install.js

设置系统管理员

npm run install-server

自定义开发

主要问题是前端编译

常见问题

docker build . -t yapii.dev -f Dockerfile.dev
docker run --rm -it -p 4000:4000 -v $PWD:/app -w /app yapii.dev /bin/sh

使用npm start启动node server,如果前端有改动,使用npm run build-client即可

note

知道你们忙,所以我来了。

  • yapi不维护了
  • 我还挺喜欢用
  • 万恶的node_modules,弄得js开发者跟诈骗犯一样