-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
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
可视化部署时,初始化数据库mongodb失败 #1605
Comments
使用命令行模式,修改 原代码: |
步骤如下 mkdir yapi
cd yapi
git clone https://gitee.com/mirrors/YApi.git vendors //或者下载 zip 包解压到 vendors 目录(clone 整个仓库大概 140+ M,可以通过 `git clone --depth=1 https://github.com/YMFE/yapi.git vendors` 命令减少,大概 10+ M)
cp vendors/config_example.json ./config.json //复制完成后请修改相关配置
cd vendors
/**
* 修改 vendors/server/utils/db.js 内,mongosse连接参数
* 原代码:let options = {useNewUrlParser: true, useCreateIndex: true};
* 修改为: let options = {useNewUrlParser: true, useCreateIndex: true,useUnifiedTopology: true };
*/
npm install --production --registry https://registry.npm.taobao.org
npm run install-server //安装程序会初始化数据库索引和管理员账号,管理员账号名可在 config.json 配置
node server/app.js //启动服务器后,请访问 127.0.0.1:{config.json配置的端口},初次运行会有个编译的过程,请耐心等候 |
十分感谢 |
版本号
~
什么问题
~
可视化部署时,初始化数据库mongodb失败
如何复现此问题
~
yapi-cli 可视化部署
什么浏览器
~
什么系统(Linux, Windows, macOS)
centos7
The text was updated successfully, but these errors were encountered: