Install npm
$ sudo apt-get install npm
$ sudo npm install npm –g // upgrade npm to latest version
You may encounter the following error:
/usr/bin/env: node: No such file or directory
This is often a misnaming error, if you install from a package manager you bin may be called nodejs, so you just need to symlink it like so:
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Install Swagger
git clone https://github.com/swagger-api/swagger-editor.git cd swagger-editornpm start
If Swagger is started successfully, you can connect web server on http://localhost:8080.
时间: 2024-11-04 15:35:51