An overview of the

This article is mainly the blogger’s own preferred blog collection, I am in accordance with these blogs to install, the final use of success. Mainly in order to reduce the time we query information, as well as to avoid some pits, improve work efficiency.

First, preparation

1. Install node.js for Windows10

Juejin. Cn/post / 684490… This tutorial is very detailed, recommend to use “Taobao NPM mirror” faster.

2. Install python in Windows10

Juejin. Cn/post / 684490… This tutorial is very detailed, there are links to Baidu network disk, can avoid external network download. Pothole Avoidance Guide: Try not to download the latest version.

3. Install Aglio

Reference: blog.csdn.net/tjj3027/art…

Method 1: use the original warehouse

npm install -g aglio
Copy the code

Method 2: Use Taobao mirror (recommended)

cnpm install -g aglio
Copy the code

The CNPM command is included in the Install Node.js tutorial

Closure Guide:

  • Error Visual Studio could not be found
    • I downloaded a Visual Studio 2019 for later development. This error is very strange, you can not download to try (I did not try)
  • Error such as phtyon
    • Mine may be because the phtyon version is too high, although the error was reported, I ignored it, now it can run normally

4. Highlight the text editing tool

  • Sublime Text + API Blueprint Sublime Text Plugin (recommended)
  • Blueprint Grammar for Atom + API Blueprint Preview (not recommended)
  • Reference article address: imkcat.com/write-restf…

Two, start writing

1. Basic grammar

  • Those who have a basic knowledge of Markdown syntax may be quicker to use
  • Online or companies have a lot of examples, copy over to change to see basically will

2. Generate AN Html page

2.1 Common Command Generation

Aglio -i interface file. apib -o interface file. HTMLCopy the code
  • explain
    • -i input (input) : file address + file name
    • -o output: followed by the destination file address + file name (Html suffix)

2.2 IDEA Using Aglio

  1. Select the command box at 1
  2. Type command at 2 (same as above for specific command)
  3. Relative paths can be used

Three, the ultimate pit avoidance

CMD command please run as administrator! (Save a lot of heart)