doc: update steps of build dashboard. (#1506)

This commit is contained in:
Wen Ming 2020-04-26 11:05:22 +08:00 committed by GitHub
parent 0e828f444b
commit d426bbb228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -146,21 +146,25 @@ APISIX has built-in support for Dashboard, as follows:
1. Please make sure your machine has the latest Node.js(10 or higher), or there will occur build issues. 1. Please make sure your machine has the latest Node.js(10 or higher), or there will occur build issues.
2. Download the source codes of [Dashboard](https://github.com/apache/incubator-apisix-dashboard): 2. Download the source codes of dashboard submodule:
``` ```
git clone https://github.com/apache/incubator-apisix-dashboard.git git submodule update --init --recursive
``` ```
3. Install [yarn](https://yarnpkg.com/en/docs/install) 3. Install [yarn](https://yarnpkg.com/en/docs/install)
4. Install dependencies then run build command: 4. Install dependencies then run build command:
``` ```
git checkout <v1.0> #The tag version same to apisix. cd dashboard
yarn && yarn build:prod yarn && yarn build:prod
``` ```
5. Integration with APISIX 5. Integration with APISIX
Copy the compiled files under `/dist` directory to the `apisix/dashboard` directory, Copy the compiled files under `/dist` directory to the `apisix/dashboard` directory,
```
cp -r dist/* .
```
open `http://127.0.0.1:9080/apisix/dashboard/` in the browser. open `http://127.0.0.1:9080/apisix/dashboard/` in the browser.
Do not need to fill the user name and password, log in directly. Do not need to fill the user name and password, log in directly.

View File

@ -147,21 +147,25 @@ APISIX 内置了对 Dashboard 的支持,使用步骤如下:
1. 确保你的运行环境中使用了最新的 Node.js 版本(>= 10 1. 确保你的运行环境中使用了最新的 Node.js 版本(>= 10
2. 下载 [Dashboard](https://github.com/apache/incubator-apisix-dashboard) 的源码: 2. 下载 dashboard 子模块的源码:
``` ```
git clone https://github.com/apache/incubator-apisix-dashboard.git git submodule update --init --recursive
``` ```
3. 安装 [yarn](https://yarnpkg.com/zh-Hans/docs/install) 3. 安装 [yarn](https://yarnpkg.com/zh-Hans/docs/install)
4. 安装依赖并构建 4. 安装依赖并构建
``` ```
git checkout <v1.0> #这里的tag版本和你使用的apisix版本一致 cd dashboard
yarn && yarn build:prod yarn && yarn build:prod
``` ```
5. 与 APISIX 集成 5. 与 APISIX 集成
把编译后的在 `/dist` 目录下的所有文件,拷贝到 `apisix/dashboard` 目录下。 把编译后的在 `/dist` 目录下的所有文件,拷贝到 `apisix/dashboard` 目录下。
```
cp -r dist/* .
```
使用浏览器打开 `http://127.0.0.1:9080/apisix/dashboard/` 即可使用, 使用浏览器打开 `http://127.0.0.1:9080/apisix/dashboard/` 即可使用,
不用填写用户名和密码,直接登录。 不用填写用户名和密码,直接登录。