# 源码

The Dashboard contains both `manager-api` and `web`, but `web` is _optional_.

The `manager-api` and `web` will be included in this build guide product.

### Prerequisites

Before using source codes to build, make sure that the following dependencies are installed in your environment.

#### manager-api

1. [Golang](https://golang.org/dl/) 1.13+: For users in mainland China, you can use the following command to speed up the module downloads.

```bash
$ go env -w GOPROXY=https://goproxy.cn,direct
```

#### web

1. [Node.js](https://nodejs.org/en/download/) 10.23.0+
2. [Yarn](https://yarnpkg.com/getting-started/install)

### Clone the project

```bash
$ git clone -b v2.3 https://github.com/apache/apisix-dashboard.git
```

### Build

```bash
$ cd apisix-dashboard
$ make build
```

When the build is complete, the results are stored in the root `output` directory.

Note: `make build` will build `manger-api` and `web`, use the `make help` command to see more commands.

### Launch

1. After the build is complete and before you start, make sure the following dependencies are installed and running in your environment.
2. [etcd](https://etcd.io/docs/v3.4.0/dl-build/) 3.4.0+
3. Check and modify the configuration information in `output/conf/conf.yaml` according to your deployment environment.
4. Launch the Dashboard

```bash
$ cd ./output

$ ./manager-api

# or running in background
$ nohup ./manager-api &
```

1. Without changing the configuration, visit `http://127.0.0.1:9000` to use the dashboard with GUI, where the default username and password are `admin`.
2. Stop the Dashboard

```bash
$ kill $(ps aux | grep 'manager-api' | awk '{print $2}')
```
