diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 9521121775d2a..af8f0b37c4678 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -73,6 +73,12 @@ Use the following `make` commands and scripts in development: - `make install` installs binaries to `$GOPATH/bin` - `make test` +### Running Coder on development mode + +- Run `./scripts/develop.sh` +- Access `http://localhost:8080` +- The default user is `admin@coder.com` and the default password is `SomeSecurePassword!` + ### Adding database migrations and fixtures #### Database migrations diff --git a/docs/contributing/frontend.md b/docs/contributing/frontend.md index a9484a5660700..d7212a4c2083c 100644 --- a/docs/contributing/frontend.md +++ b/docs/contributing/frontend.md @@ -2,6 +2,15 @@ This is a guide to help the Coder community and also Coder members contribute to our UI. It is ongoing work but we hope it provides some useful information to get started. If you have any questions or need help, please send us a message on our [Discord server](https://discord.com/invite/coder). We'll be happy to help you. +## Running the UI + +You can run the UI and access the dashboard in two ways: + +- Build the UI pointing to an external Coder server: `CODER_HOST=https://mycoder.com yarn dev` inside of the `site` folder. This is helpful when you are building something in the UI and already have the data on your deployed server. +- Build the entire Coder server + UI locally: `./scripts/develop.sh` in the root folder. It is useful when you have to contribute with features that are not deployed yet or when you have to work on both, frontend and backend. + +In both cases, you can access the dashboard on `http://localhost:8080`. If you are running the `./scripts/develop.sh` you can log in using the default credentials: `admin@coder.com` and `SomeSecurePassword!`. + ## Tech Stack All our dependencies are described in `site/package.json` but here are the most important ones: diff --git a/scripts/develop.sh b/scripts/develop.sh index 8f822c16109e2..93696f36f16cc 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -13,7 +13,8 @@ source "${SCRIPT_DIR}/lib.sh" [[ -n ${VERBOSE:-} ]] && set -x set -euo pipefail -password="${CODER_DEV_ADMIN_PASSWORD:-password}" +DEFAULT_PASSWORD="SomeSecurePassword!" +password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}" args="$(getopt -o "" -l agpl,password: -- "$@")" eval set -- "$args"