From d426bbb22876e4307290ec53cdf825580f112e40 Mon Sep 17 00:00:00 2001 From: Wen Ming Date: Sun, 26 Apr 2020 11:05:22 +0800 Subject: [PATCH] doc: update steps of build dashboard. (#1506) --- README.md | 10 +++++++--- README_CN.md | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e950d084b92..d29a57d144b7 100644 --- a/README.md +++ b/README.md @@ -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. -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) 4. Install dependencies then run build command: ``` -git checkout #The tag version same to apisix. +cd dashboard yarn && yarn build:prod ``` 5. Integration with APISIX 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. Do not need to fill the user name and password, log in directly. diff --git a/README_CN.md b/README_CN.md index 503be7c5b70f..c09db06bff76 100644 --- a/README_CN.md +++ b/README_CN.md @@ -147,21 +147,25 @@ APISIX 内置了对 Dashboard 的支持,使用步骤如下: 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) 4. 安装依赖并构建 ``` -git checkout #这里的tag版本和你使用的apisix版本一致 +cd dashboard yarn && yarn build:prod ``` 5. 与 APISIX 集成 把编译后的在 `/dist` 目录下的所有文件,拷贝到 `apisix/dashboard` 目录下。 +``` +cp -r dist/* . +``` + 使用浏览器打开 `http://127.0.0.1:9080/apisix/dashboard/` 即可使用, 不用填写用户名和密码,直接登录。