From 1b7fa27d32da115684cacd855d97b539ff18cec9 Mon Sep 17 00:00:00 2001 From: Patti Shin Date: Fri, 10 Feb 2023 11:40:44 -0800 Subject: [PATCH] refactor: client app readme, routing (#779) * refactor: minor clean up, add migration note in readme * fix: resolve routing error on hard refresh * refactor: updating web-dev-server config --- client-app/README.md | 6 +++--- client-app/web-dev-server.config.mjs | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client-app/README.md b/client-app/README.md index e4fdeb288..c35817cd3 100644 --- a/client-app/README.md +++ b/client-app/README.md @@ -1,4 +1,4 @@ -# Emblem Giving frontend application +# Emblem Giving frontend application ⚠️ (Migration pending) ## Quicklinks * [Requirements](requirements) @@ -124,7 +124,7 @@ If you would like to manually build & deploy, read on. ```bash cd client-app/ gcloud set project $OPS_PROJECT // All images are in this registry -gcloud builds submit --tag $REGION-docker.pkg.dev/ $OPS_PROJECT/website/lit-based-website +gcloud builds submit --tag $REGION-docker.pkg.dev/$OPS_PROJECT/website/lit-based-website ``` ### Auth server container @@ -151,7 +151,7 @@ gcloud run deploy --image=$REGION-docker.pkg.dev/$OPS_PROJECT/website/lit-based- ```bash cd server/ gcloud set project $OPS_PROJECT -gcloud run deploy --image=$REGION-docker.pkg.dev$OPS_PROJECT/website/lit-auth-api --port 4000 +gcloud run deploy --image=$REGION-docker.pkg.dev/$OPS_PROJECT/website/lit-auth-api --port 4000 ``` List of required environment variables and secrets needed to update each Cloud Run container in order to function properly. diff --git a/client-app/web-dev-server.config.mjs b/client-app/web-dev-server.config.mjs index b4eb3afef..b9c8a2f15 100644 --- a/client-app/web-dev-server.config.mjs +++ b/client-app/web-dev-server.config.mjs @@ -20,8 +20,12 @@ const hmr = process.argv.includes('--hmr'); const theme = process.env.THEME; export default /** @type {import('@web/dev-server').DevServerConfig} */ ({ - open: '/', watch: !hmr, + port: 8081, + open: true, + rootDir: '.', + basePath: '/', + appIndex: 'index.html', nodeResolve: { exportConditions: ['browser', 'development'] },