diff --git a/.github/workflows/golang-lint.yml b/.github/workflows/go-lint.yml similarity index 82% rename from .github/workflows/golang-lint.yml rename to .github/workflows/go-lint.yml index ae6e0c16c4..0de9fe39af 100644 --- a/.github/workflows/golang-lint.yml +++ b/.github/workflows/go-lint.yml @@ -1,4 +1,4 @@ -name: golang-lint +name: go-lint on: push: branches: @@ -17,4 +17,4 @@ jobs: - uses: actions/checkout@v2 - name: run lint - run: make golang-lint + run: make go-lint diff --git a/Makefile b/Makefile index 35adb564f4..4b546a0ee8 100644 --- a/Makefile +++ b/Makefile @@ -17,28 +17,61 @@ SHELL := /bin/bash -o pipefail UNAME ?= $(shell uname) +YARN_EXEC ?= $(shell which yarn) +GO_EXEC ?= $(shell which go) -### help: Show Makefile rules +export GO111MODULE=on + +### help: Show Makefile rules .PHONY: help help: @echo Makefile rules: @echo @grep -E '^### [-A-Za-z0-9_]+:' Makefile | sed 's/###/ /' -export GO111MODULE=on -### license-check: Check apisix-dashboard source codes for Apache License -.PHONY: license-check -license-check: -ifeq ("$(wildcard .actions/openwhisk-utilities/scancode/scanCode.py)", "") - git clone https://github.com/apache/openwhisk-utilities.git .actions/openwhisk-utilities - cp .actions/ASF* .actions/openwhisk-utilities/scancode/ +### build: Build Apache APISIX Dashboard, it contains web and manager-api +.PHONY: build +build: web-default api-default + api/build.sh && cd /web && yarn install && yarn build + mkdir -p ./output/logs + + +.PHONY: web-default +web-default: +ifeq ("$(wildcard $(YARN_EXEC))", "") + @echo "ERROR: Need to install yarn first" + exit 1 endif - .actions/openwhisk-utilities/scancode/scanCode.py --config .actions/ASF-Release.cfg ./ -### golang-lint: Lint Go source code -.PHONY: golang-lint -golang-lint: ## Run the golangci-lint application (install if not found) + +.PHONY: api-default +api-default: +ifeq ("$(wildcard $(GO_EXEC))", "") + @echo "ERROR: Need to install golang 1.13+ first" + exit 1 +endif + + +### api-test: Run the tests of manager-api +.PHONY: api-test +api-test: api-default + cd api/ && APISIX_API_WORKDIR=$$PWD go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... + + +### api-run: Run the manager-api +.PHONY: api-run +api-run: api-default + cd api/ && go run . + +### api-stop: Stop the manager-api +api-stop: + kill $(ps aux | grep 'manager-api' | awk '{print $2}') + + +### go-lint: Lint Go source code +.PHONY: go-lint +go-lint: ## Run the golangci-lint application (install if not found) @#Brew - MacOS @if [ "$(shell command -v golangci-lint)" = "" ] && [ "$(shell command -v brew)" != "" ] && [ "$(UNAME)" = "Darwin" ]; then brew install golangci-lint; fi; @#has sudo @@ -46,8 +79,18 @@ golang-lint: ## Run the golangci-lint application (install if not found) @echo "running golangci-lint..." @cd api && golangci-lint run --tests=false ./... -### api-test: Run the tests of manager-api -.PHONY: api-test -api-test: - cd api/ && APISIX_API_WORKDIR=$$PWD go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... + +### license-check: Check Apache APISIX Dashboard Source Codes for Apache License +.PHONY: license-check +license-check: +ifeq ("$(wildcard .actions/openwhisk-utilities/scancode/scanCode.py)", "") + git clone https://github.com/apache/openwhisk-utilities.git .actions/openwhisk-utilities + cp .actions/ASF* .actions/openwhisk-utilities/scancode/ +endif + .actions/openwhisk-utilities/scancode/scanCode.py --config .actions/ASF-Release.cfg ./ + + +.PHONY: release-src +release-src: + tar –cf dashboard.tar ./output/* diff --git a/README.md b/README.md index a095d06bff..a85150005a 100644 --- a/README.md +++ b/README.md @@ -21,21 +21,72 @@ English | [简体中文](./README.zh-CN.md) # Apache APISIX Dashboard -Dashboard for [Apache APISIX](https://github.com/apache/apisix) +Apache APISIX Dashboard for [Apache APISIX](https://github.com/apache/apisix) -## User Guide +The goal of Apache APISIX Dashboard project is to let users to quickly experience and learn Apache APISIX, but it still cannot be used directly in a production environment. -Please refer to [User Guide](./docs/USER_GUIDE.md) +Its function is always a subset of Apache APISIX, and may lag behind the rapid iteration of Apache APISIX. + +If you need to use the Apache APISIX Dashboard project in a production system, you need to enhance user permissions, communication security, high availability and other advanced features. + +## Installation + +Support multiple ways to install Apache APISIX Dashboard + +### Docker + +Start a runnable version by the following method + +- [Deploy With Docker](./docs/deploy-with-docker.md) + +### Build from Source Code + +To build Apache APISIX Dashboard from source code, first make sure that your `golang` version is 1.13 or greater. + +Also you need to make sure that `Node.js` and `yarn` are installed. + +```sh +$ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git +$ cd apisix-dashboard +$ make build +``` + +Then you can find all files (configuration files, executable files, web static resources) needed to run Apache APISIX Dashboard in the `./output` directory. -## Deployment +Start by the following commands. -- [Deploy Manually](./docs/deploy.md) -- [Deploy with Docker](./docs/deploy-with-docker.md) +```sh +$ cd ./output +$ exec ./manager-api +``` -## Development +`makefile` provides the following commands. -- [Apache APISIX](https://github.com/apache/apisix) -- [Dashboard](./docs/develop.md) +```text +Makefile rules: + + help: Show Makefile rules + build: Build Apache APISIX Dashboard, it contains web and manager-api + api-test: Run the tests of manager-api + api-run: Run the manager-api + api-stop: stop manager-api + go-lint: Lint Go source code + license-check: Check Apache APISIX Dashboard Source Codes for Apache License +``` + +For more detailed construction steps, see - [Build from Source Codes](./docs/deploy.md) + +### For developer + +Apache APISIX Dashboard provides a management interface for [Apache APISIX](https://github.com/apache/apisix), you need to [install APISIX first](https://github.com/apache/apisix#configure-and-installation). + +Please refer to here to start `manager-api` and `web`respectively. + +- [Develop Apache APISIX Dashboard](./docs/develop.md) + +## User guide + +Please refer to [User Guide](./docs/USER_GUIDE.md) ## Milestones @@ -46,10 +97,14 @@ Please refer to [User Guide](./docs/USER_GUIDE.md) See [CONTRIBUTING](./CONTRIBUTING.md) for details on submitting patches and the contribution workflow. +## License + +Apache License 2.0, [LICENSE](https://github.com/apache/apisix-dashboard/blob/master/LICENSE) + ## FAQ -1. If you need the dashboard-1.0 which is built with Vue.js, please refer to [master-vue](https://github.com/apache/apisix-dashboard/tree/master-vue). +1. If you need the Apache APISIX Dashboard 1.0 which is built with Vue.js, please refer to [master-vue](https://github.com/apache/apisix-dashboard/tree/master-vue). -2. The dashboard 2.0 removes MySQL which [dashboard 1.5](https://github.com/apache/apisix-dashboard/tree/backup-1.5-latest) is relied on. +2. The Apache APISIX Dashboard 2.0 removes MySQL which [Apache APISIX Dashboard 1.5](https://github.com/apache/apisix-dashboard/tree/backup-1.5-latest) is relied on. -3. If you are using APISIX 1.5 or below, kindly note that the v2 api store and v3 api store are [separate and isolated](https://etcd.io/docs/v3.4.0/op-guide/v2-migration/). Dashboard v2.0 and above use the etcd v3 api, APISIX 1.5 and below use the etcd v2 api. +3. If you are using APISIX 1.5 or below, kindly note that the v2 api store and v3 api store are [separate and isolated](https://etcd.io/docs/v3.4.0/op-guide/v2-migration/). Apache APISIX Dashboard v2.0 and above use the etcd v3 api, APISIX 1.5 and below use the etcd v2 api. diff --git a/README.zh-CN.md b/README.zh-CN.md index 67a0cfd507..3b4e53a34d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -19,25 +19,72 @@ [English](./README.md) | 简体中文 -# [Apache APISIX](https://github.com/apache/apisix) 控制台 +# Apache APISIX Dashboard -## 用户指南 +Apache APISIX Dashboard 项目的目标是为了让大家快速上手体验和学习 Apache APISIX,并不能直接用于生产环境。 -请参考 [用户指南](./docs/USER_GUIDE.zh-CN.md) +它的功能永远都是 Apache APISIX 的子集,也可能会滞后于 Apache APISIX 的快速迭代。 + +如果你需要把 Apache APISIX Dashboard 项目用于生产系统,需要对用户权限、通讯安全、高可用、高级功能等方面做增强。 + +## 安装 + +提供多种方式来安装 Apache APISIX Dashboard + +### Docker + +通过下面的方法来启动一个可运行的版本 + +- [使用 Docker 一键部署](./docs/deploy-with-docker.zh-CN.md) + +### 从源代码构建 + +从源代码构建,首先先确认你的 `golang` 版本在 1.13 或者 更高的版本。 + +同样你也需要提前安装好 `Node.js` 和 `yarn`。 + +```sh +$ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git +$ cd apisix-dashboard +$ make build +``` -## 部署 +然后你可以在 `./output` 目录下找到运行 Apache APISIX Dashboard 需要的所有文件(配置文件、可执行文件、web静态资源) -当前支持如下方式部署: +通过下面的命令启动 -- [手动部署](./docs/deploy.zh-CN.md) -- [使用 Docker 部署](./docs/deploy-with-docker.zh-CN.md) +```sh +$ cd ./output +$ exec ./manager-api +``` -## 开发 +`makefile` 提供以下几种命令 -开发分为 Apache APISIX 开发、Dashboard 开发 +```text +Makefile rules: -- [Apache APISIX](https://github.com/apache/apisix) -- [Dashboard](./docs/develop.zh-CN.md) + help: Show Makefile rules + build: Build Apache APISIX Dashboard, it contains web and manager-api + api-test: Run the tests of manager-api + api-run: Run the manager-api + api-stop: stop manager-api + go-lint: Lint Go source code + license-check: Check Apache APISIX Dashboard Source Codes for Apache License +``` + +更详细的构建步骤参见这里 - [从源代码构建](./docs/deploy.zh-CN.md) + +### 对于开发者 + +Apache APISIX Dashboard 为 [Apache APISIX](https://github.com/apache/apisix) 提供管理界面,需要先[安装 APISIX](https://github.com/apache/apisix#configure-and-installation). + +然后请参考这里分别启动 `manager-api` 和 `web` + +- [开发 Apache APISIX Dashboard](./docs/develop.zh-CN.md) + +## 使用指南 + +请参考 [用户指南](./docs/USER_GUIDE.zh-CN.md) ## 里程碑 @@ -48,8 +95,12 @@ 请参考[贡献指南](./CONTRIBUTING.md)以获取更详细的流程。 +## License + +Apache License 2.0, [LICENSE](https://github.com/apache/apisix-dashboard/blob/master/LICENSE) + ## FAQ -1. 如果你需要 Vue.js 构建的 dashboard-1.0,请使用 [master-vue 分支](https://github.com/apache/apisix-dashboard/tree/master-vue)。 +1. 如果你需要 Vue.js 构建的 Apache APISIX Dashboard 1.0,请使用 [master-vue 分支](https://github.com/apache/apisix-dashboard/tree/master-vue)。 2. 2.0 版本的控制台移除了[1.5 版本](https://github.com/apache/apisix-dashboard/tree/backup-1.5-latest)中的 MySQL,将直接操作 etcd。 -3. 如果你使用 v2.0 以下版本的 Apache APISIX,需要注意 etcd v2 API 的数据与 v3 API 的数据是[不互通的](https://etcd.io/docs/v3.4.0/op-guide/v2-migration/)。Dashboard v2.0 及以上版本使用 etcd v3 API,apisix 1.5 及以下版本使用 etcd v2 API。 +3. 如果你使用 v2.0 以下版本的 Apache APISIX,需要注意 etcd v2 API 的数据与 v3 API 的数据是[不互通的](https://etcd.io/docs/v3.4.0/op-guide/v2-migration/)。Apache APISIX Dashboard v2.0 及以上版本使用 etcd v3 API,apisix 1.5 及以下版本使用 etcd v2 API。 diff --git a/docs/deploy-with-docker.zh-CN.md b/docs/deploy-with-docker.zh-CN.md index 51950c7926..2c0e9d26a9 100644 --- a/docs/deploy-with-docker.zh-CN.md +++ b/docs/deploy-with-docker.zh-CN.md @@ -42,6 +42,8 @@ $ docker build -t apisix-dashboard:{$tag} . $ docker run -d -p 80:8080 -v /path/to/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml --name apisix-dashboard apisix-dashboard:{$tag} ``` +现在你可以在浏览器中通过 `http://127.0.0.1` 使用 Dashboard。 + ## 注意 1. 构建镜像后,如需修改配置文件,可通过使用 `docker -v /local-path-to-conf-file:/conf/conf.yaml` 参数指定 `manager-api` 所需要的配置文件,以便启动容器时动态加载配置文件。 diff --git a/docs/deploy.md b/docs/deploy.md index f656c2afb3..4cda2f1d32 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -27,9 +27,11 @@ $ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git $ cd apisix-dashboard ``` -## Build the manager-api +## Build -The `manager-api` is used to provide APIs for Dashboard, just like a bridge between the Apache APISIX and the Dashboard. Here are the steps to build it manually: +### Manager-api dependencies + +The `manager-api` is used to provide APIs for Apache APISIX Dashboard, just like a bridge between the Apache APISIX and the Apache APISIX Dashboard. Here are the steps to build it manually: 1. We need `Go` 1.13+ to be preinstalled. @@ -37,51 +39,30 @@ NOTE: You also need to install `Lua` 5.1+ if you want to use the Plugin Orchestr 2. Check environment variables -- enable Go MODULE - -```sh -$ go env -w GO111MODULE=on -``` - - For most users in China, we could use [Goproxy](https://goproxy.cn/) to speed up downloading modules. ```sh $ go env -w GOPROXY=https://goproxy.cn,direct ``` -3. Build - -```sh -$ api/build.sh -``` - -The bundled files are located in the root directory `/output`. - -## Build the web +### Web dependencies This project is initialized with [Ant Design Pro](https://pro.ant.design). The following are some quick guides for how to use. 1. Make sure you have `Node.js(version 10.0.0+)` installed on your machine. 2. Install [yarn](https://yarnpkg.com/). -3. Install dependencies: - -```sh -$ cd /web - -$ yarn install -``` -4. Build +### Build ```sh -$ yarn build +$ make build ``` -The bundled files are located in the root directory `/output/html`. +The bundled files are located in the root directory `output`. ## Run -1. According to your deploy environment, check the related configurations in `api/conf/conf.yaml`, modify those variables if needed. +1. According to your deploy environment, check the related configurations in `output/conf/conf.yaml`, modify those variables if needed. Example: @@ -104,41 +85,48 @@ authentication: password: user ``` -2. Run manager-api +2. Run Apache APISIX Dashboard ```sh -$ api/run.sh & +$ cd ./output +$ ./manager-api ``` 3. Visit `http://127.0.0.1:8080` in your browser, `8080` is the default listen port of manager-api. -## Configuration +3. Stop Apache APISIX Dashboard -1. `conf.dag-lib-path` MUST use absolute path, we could use `pwd` command. Only used when enable Plugin Orchestration. +```sh +$ kill $(ps aux | grep 'manager-api' | awk '{print $2}') +``` -2. `conf.listen.host` is set to `127.0.0.1` so we could only visit it in private, we could change it to `0.0.0.0` to allow any visitors. +## Package -3. `conf.etcd.endpoints` is used to set ETCD's instances address, it supports multiple instances mode. +Package the output directory, the output directory contains all the files needed to run the Apache APISIX Dashboard (configuration files, executable files, web static resources) -```json -{ - "etcd": { - "endpoints": "127.0.0.1:2379,127.0.0.1:3379" - } -} +```sh +$ make release-src ``` -## NOTE +## Configuration -1. When the manager-api is running in background, before we want to rebuild & re-deploy it, we should find the process id then kill it. +1. `conf.dag-lib-path` must use absolute path, we could use `pwd` command. Only used when enable Plugin Orchestration. -```sh -$ ps aux | grep manager-api +2. `conf.listen.host` is set to `127.0.0.1` so we could only visit it in private, we could change it to `0.0.0.0` to allow any visitors. + +3. `conf.etcd.endpoints` is used to set ETCD's instances address, it supports multiple instances mode. -$ kill $process_id +```yaml +conf: + etcd: + endpoints: + - 127.0.0.1:2379 + - 127.0.0.1:3379 ``` -2. After compiling the Manager API, if you move the compiled product to another location, an error will be reported at startup, this is because the configuration file's **absolute path** is fixed in the product and needs to be resolved by running an environment variable to set the location of the configuration file before running. +## NOTE + +1. After compiling the `manager-api`, if you move the compiled product to another location, an error will be reported at startup, this is because the configuration file's **absolute path** is fixed in the product and needs to be resolved by running an environment variable to set the location of the configuration file before running. ```sh $ export APISIX_CONF_PATH=/home/demo_user/workspace/apisix-dashboard/api/conf diff --git a/docs/deploy.zh-CN.md b/docs/deploy.zh-CN.md index 455fb4db37..98415fbf36 100644 --- a/docs/deploy.zh-CN.md +++ b/docs/deploy.zh-CN.md @@ -17,7 +17,7 @@ # --> -# 手动部署 +# 从源文件打包部署 ## 克隆项目 @@ -27,7 +27,9 @@ $ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git $ cd apisix-dashboard ``` -## 构建 manager-api +## 构建 + +### Manager-api 检查项 `manager-api` 用于为控制台提供接口,就像 Apache APISIX 和控制台之间的桥梁。下面是手动构建步骤: @@ -37,27 +39,13 @@ $ cd apisix-dashboard 2. 检查环境变量 -- 开启 Go MODULE - -```sh -$ go env -w GO111MODULE=on -``` - - 对于大多数中国用户,我们可以使用 [Goproxy](https://goproxy.cn/) 加快模块下载速度。 ```sh $ go env -w GOPROXY=https://goproxy.cn,direct ``` -3. 构建 - -```sh -$ api/build.sh -``` - -构建完成后的文件在根目录 `/output` 下。 - -## 构建前端 +### 前端 检查项 该项目使用 [Ant Design Pro](https://pro.ant.design) 初始化。以下是一些使用方法的快速指南。 @@ -65,25 +53,18 @@ $ api/build.sh 2. 安装 [yarn](https://yarnpkg.com/)。 -3. 安装依赖: - -```sh -$ cd /web - -$ yarn install -``` +### 开始构建 -4. 构建 ```sh -$ yarn build +$ make build ``` -构建完成后的文件在根目录 `/output/html` 目录下。 +构建完成后的文件在根目录 `output` 下。 ## 启动 -1. 根据您的部署环境,检查并修改 `api/conf/conf.yaml` 中的配置。 +1. 根据您的部署环境,检查并修改 `output/conf/conf.yaml` 中的配置。 例如: @@ -106,14 +87,29 @@ authentication: password: user ``` -2. 启动 manager-api +2. 启动 Apache APISIX Dashboard ```sh -$ api/run.sh & +$ cd ./output +$ ./manager-api ``` 3. 在浏览器中访问 `http://127.0.0.1:8080`,`8080` 是 manager-api 的默认监听端口。 +4. 关闭 Apache APISIX Dashboard + +```sh +$ kill $(ps aux | grep 'manager-api' | awk '{print $2}') +``` + +## 打包 output 目录 + +你可以把刚刚 output 目录整体打包,copy 到其他地方解压运行,output 目录包含运行 Apache APISIX Dashboard 需要的所有文件(配置文件、可执行文件、web静态资源) + +```sh +$ make release-src +``` + ## 配置参数 1. `conf.dag-lib-path` 参数需要使用绝对路径,可通过 `pwd` 指令获取。仅在使用插件编排功能时需要指定。 @@ -122,25 +118,17 @@ $ api/run.sh & 3. `conf.etcd.endpoints` 用于配置 ETCD 实例,支持集群模式。 -```json -{ - "etcd": { - "endpoints": "127.0.0.1:2379,127.0.0.1:3379" - } -} +```yaml +conf: + etcd: + endpoints: + - 127.0.0.1:2379 + - 127.0.0.1:3379 ``` ## 注意 -1. 当 manager-api 在后台模式下运行,在重新编译、重新部署它之前,我们需要查找其进程并结束掉它: - -```sh -$ ps aux | grep manager-api - -$ kill $process_id -``` - -2. 在编译 Manager API 后,如移动编译后产物到其它位置,启动时将会报错,这是由于配置文件**绝对路径**被固定在了产物中,需要在运行前,通过执行环境变量设置配置文件位置来解决。 +1. 在编译 Manager API 后,如移动编译后产物到其它位置,启动时将会报错,这是由于配置文件**绝对路径**被固定在了产物中,需要在运行前,通过执行环境变量设置配置文件位置来解决。 ```sh $ export APISIX_CONF_PATH=/home/demo_user/workspace/apisix-dashboard/api/conf diff --git a/docs/develop.md b/docs/develop.md index 8240b83e41..1104cc5ad7 100644 --- a/docs/develop.md +++ b/docs/develop.md @@ -17,7 +17,14 @@ # --> -# Dashboard Devlopment +# Apache APISIX Dashboard Devlopment + +## Dependencies + +```sh +$ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git +$ cd apisix-dashboard +``` ## Web @@ -30,7 +37,8 @@ $ yarn install ``` 4. If we want to modify the API, please refer to the `config/proxy.ts` file. -5. Start the development mode + +5. Start (the development mode) ```sh $ yarn start @@ -40,13 +48,48 @@ $ yarn start Please refer to [E2E Documentation](../web/src/e2e/README.md). -## manager-api +## Manager-api + +### Start + +1. Modify `config.yaml` in `api/conf/conf.yaml` + +```yaml +conf: + listen: + host: 127.0.0.1 + port: 8080 + dag_lib_path: '' + etcd: + endpoints: + - 127.0.0.1:2379 +authentication: + secret: secret + expireTime: 3600 + users: + - username: admin + password: admin + - username: user + password: user +``` + +2. Start (the development mode) + +```sh +$ make api-run +``` + +3. Stop (the development mode) + +```sh +$ make api-stop +``` ### Sync jsonschema To sync jsonschema from Apache APISIX, `Lua` 5.1+ and `zip` need to be preinstalled, then execute this command: `api/build-tools/schema-sync.sh $version`. -NOTE: `$version` should be `master` or Apache APISIX's version. +NOTE: `$version` should be `master` or Apache APISIX's version. Example: diff --git a/docs/develop.zh-CN.md b/docs/develop.zh-CN.md index 69f8fa0bc8..12d81f8a86 100644 --- a/docs/develop.zh-CN.md +++ b/docs/develop.zh-CN.md @@ -17,7 +17,14 @@ # --> -# Dashboard 开发 +# Apache APISIX Dashboard 开发 + +## 前置条件 + +```sh +$ git clone -b v2.0 https://github.com/apache/apisix-dashboard.git +$ cd apisix-dashboard +``` ## 前端开发 @@ -33,7 +40,7 @@ $ yarn install 4. 若需要修改 manager-api 地址,请访问 `config/proxy.ts` 文件。 -5. 启动开发模式 +5. 启动 (开发模式) ```sh $ yarn start @@ -43,7 +50,42 @@ $ yarn start 请参考 [E2E 文档](../web/src/e2e/README.zh-CN.md)。 -## manager-api 开发 +## 开发 manager-api + +### 启动 + +1. 修改配置文件 目录: `api/conf/conf.yaml` + +```yaml +conf: + listen: + host: 127.0.0.1 + port: 8080 + dag_lib_path: '' + etcd: + endpoints: + - 127.0.0.1:2379 +authentication: + secret: secret + expireTime: 3600 + users: + - username: admin + password: admin + - username: user + password: user +``` + +2. 启动 (开发模式) + +```sh +$ make api-run +``` + +3. 关闭 (开发模式) + +```sh +$ make api-stop +``` ### 同步 jsonschema @@ -60,3 +102,4 @@ $ api/build-tools/schema-sync.sh master # 使用 Apache APISIX 的版本号 $ api/build-tools/schema-sync.sh 2.0 ``` +