安装mongo

  • docker pull mongo:4
  • docker run -d —network somenetwork —name some-mongo -p 27017:27017 mongo:4

安装yapi

启动初始化

  • yapi server

image.png

启动yapi

  • node server/app.js

image.png

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