diff --git a/build.sh b/build.sh index 1938d82..1c85fe4 100644 --- a/build.sh +++ b/build.sh @@ -1,32 +1,63 @@ #!/bin/sh +# create folder to pack all +echo "Starting build process..." mkdir build -cd main-web/client -npm run build -cd ../../ -mv main-web/client/client build + +# build janken tool and move cd tools/janken +echo "Starting janken tool build..." npm run build cd ../../ mv tools/janken/tool build +echo "Finished janken tool build..." + +# build client and move +cd main-web/client +echo "Starting client build..." +npm run build +cd ../../ +mv main-web/client/client build +echo "Finished client build..." + +# build admin and move +cd main-web/admin +echo "Starting admin ui build..." +npm run build +cd ../../ +mv main-web/admin/build build/admin +echo "Finished admin ui build..." + +# build server and move cd main-web/server +echo "Starting server build..." npm run build cd ../../ cd build/ +echo "Starting retrieval of db credentials..." export catherine_db_endpoint=$(aws --region=ap-northeast-1 ssm get-parameter --name "db-endpoint" --with-decryption --output text --query Parameter.Value) export catherine_db_user=$(aws --region=ap-northeast-1 ssm get-parameter --name "db-username" --with-decryption --output text --query Parameter.Value) export catherine_db_pass=$(aws --region=ap-northeast-1 ssm get-parameter --name "db-password" --with-decryption --output text --query Parameter.Value) +echo "Saving db credentials to .env file..." cat > .env < = (props): JSX.Element => { + const opts = { + height: '696', + width: '1024' + }; return (
@@ -16,11 +21,10 @@ export const Home: FunctionComponent = (props): JSX.Element => {
 
-
-
-
-
-
+
); }; diff --git a/main-web/server/src/index.ts b/main-web/server/src/index.ts index f5cffca..8cf9dc8 100644 --- a/main-web/server/src/index.ts +++ b/main-web/server/src/index.ts @@ -141,6 +141,7 @@ app.get('/api/contact', (req: any, res: any) => { ); }); +app.use('/admin', express.static('admin')); app.use('/players', express.static('client')); app.use('/tournaments*', express.static('client')); app.use('/about', express.static('client'));