From 7ebdc19e4aa53219193673df618c0e670f21505b Mon Sep 17 00:00:00 2001 From: Pudong Zheng Date: Wed, 6 Oct 2021 16:45:32 +0800 Subject: [PATCH] [dashboard] make easier to develop and test Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> --- components/dashboard/README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/components/dashboard/README.md b/components/dashboard/README.md index e13bd8b9be7e1f..296641132cab87 100644 --- a/components/dashboard/README.md +++ b/components/dashboard/README.md @@ -31,4 +31,25 @@ const GitIntegration = React.lazy(() => import('./settings/GitIntegration')); Global state is passed through `React.Context`. After creating a new component, run the following to update the license header: -`leeway run components:update-license-header` \ No newline at end of file +`leeway run components:update-license-header` + +## How to develop in gitpod.io + +Edit `craco.config.js`, add `devServer` section, replace GITPOD_HOST to `SaaS Gitpod host` or `self-hosted Gitpod host`, then replace `cookie` field. +```js + devServer: { + proxy: { + '/api': { + target: 'https://' + GITPOD_HOST, + ws: true, + headers: { + host: GITPOD_HOST, + origin: 'https://' + GITPOD_HOST, + cookie: '__REPLACE_YOUR_COOKIE__' + }, + } + } + } +``` + +After following the above steps, run `yarn run start` to start developing. \ No newline at end of file