Download Node.js from the website below and set it up locally. (Because Swagger is written by Node.js, we need to setup Node.js environment to run it.) http://nodejs.cn/download/
(Optional) Open a command line window, run the following command to make sure Node.js is installed successfully: node -v
Run the following command to install necessary tools, such as python2.7, vc++ and .netFramework4.5, if you do not install them, then the process of installing Swagger may fail with message like this: “Error: Can’t find Python executable “python”, you can set the PYTHON env variable.” npm install --global --production windows-build-tools
Unzip the package you just downloaded and put it to a directory, such as: C:\swagger-editor-master
In command line window, navigate to C:\swagger-editor-master, then run the command below to install Swagger and dependencies. (It may take a long time to finish, ignore those warnings) npm install --no-optional
In command line window, navigate to C:\swagger-editor-master, then run the command below to run the http server of Swagger npm start
You may see the following info on console, which indicates you to visit http server. Starting up http-server, serving ./ Available on: http://x.x.x.x:3001 http://127.0.0.1:3001
In the command line window, press “Ctrl + c” to stop server. If you want to start the server again, run command “npm start” in C:\swagger-editor-master folder.
How to setup/use Swagger on local Windows machineDownload Node.js from the website below and set it up locally. (Because Swagger is written by Node.js, we need to setup Node.js environment to run it...