安装mongo
- docker pull mongo:4
- docker run -d —network somenetwork —name some-mongo -p 27017:27017 mongo:4
安装yapi
- npm install -g yapi-cli —registry https://registry.npm.taobao.org
启动初始化
- yapi server
启动yapi
- node server/app.js
docker run -d —network somenetwork —name some-mongo -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo
docker run -d —network somenetwork —name some-mongo -p 27017:27017 -u mongoadmin -p secret —authenticationDatabase admin yapi mongo:4