We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
部署的时候情绪非常“激动”,各种问题跑不起来,从下午4点至凌晨1点消耗了大约一整个晚上,差点摔电脑。
遂,此路不通转换思路。大致分为 5 步骤:
解决问题,思路很重要。。。
The text was updated successfully, but these errors were encountered:
============ 补一个安装成功步骤 ============ 安装依赖
nodejs:10.16+ mongodb:4.0.x
创建数据库与登录用户(前题已安装mongodb)
#进入客户端 ./mongo # 定位到admin内置库 use admin # 用admin中的超管用户鉴权 db.auth('root','123456') # 定位到mydemo业务库 use yapi # 创建普通用户 db.createUser({user:"my_yapi",pwd:"123456",roles:[{ role: "readWrite", db: "yapi" }]}) # 用户鉴权 db.auth('my_yapi','123456') # 客户端登录指定库 ./mongo 127.0.0.1:27017/yapi -u "my_yapi" -p "123456"
本地下载源码编译安装
mkdir yapi cd yapi # 或者下载 zip 包解压到 vendors 目录(clone 整个仓库大概 140+ M,可以通过 `git clone --depth=1 https://github.com/YMFE/yapi.git vendors` 命令减少,大概 10+ M) git clone https://github.com/YMFE/yapi.git vendors # 复制完成后请修改相关配置 cp vendors/config_example.json ./config.json cd vendors npm install --production --registry https://registry.npm.taobao.org # 安装程序会初始化数据库索引和管理员账号,管理员账号名可在 config.json 配置 npm run install-server # 启动服务器后,请访问 127.0.0.1:{config.json配置的端口},初次运行会有个编译的过程,请耐心等候 node server/app.js
管理yapi启停
# 安装pm2,使程序后台启动 npm install -g pm2 # 启动 pm2 start vendors/server/app.js # 重启 pm2 restart vendors/server/app.js # 停止 pm2 stop vendors/server/app.js
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
部署的时候情绪非常“激动”,各种问题跑不起来,从下午4点至凌晨1点消耗了大约一整个晚上,差点摔电脑。
遂,此路不通转换思路。大致分为 5 步骤:
解决问题,思路很重要。。。
The text was updated successfully, but these errors were encountered: