以下是在Ubuntu上安装Swagger UI的几种方法:
sudo apt update
,sudo apt install -y nodejs npm
。sudo npm install -g swagger-ui
。wget https://github.com/swagger-api/swagger-ui/archive/refs/tags/v3.48.0.tar.gz
,tar -xvf v3.48.0.tar.gz
。cd swagger-ui-3.48.0
,npm install
,node index.js
,访问http://localhost:3000
。git clone https://github.com/swagger-api/swagger-ui.git
。cd swagger-ui
,npm install
。npm start
,访问http://localhost:3000/swagger-ui/index.html
。