aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-01-13 18:55:31 -0600
committerAnthony Wang2022-01-13 18:55:31 -0600
commitd6d9f3056261cf6a7f3306e163de125d7039e925 (patch)
treee341540d25bef1c829a3fc8924bdf1726d038fb0
parenta39796fc55ddbd2588146f36e674a56546a7a6dc (diff)
Make frontend port and env var in run script too
-rwxr-xr-xrun8
1 files changed, 6 insertions, 2 deletions
diff --git a/run b/run
index d654729..ece841b 100755
--- a/run
+++ b/run
@@ -1,5 +1,10 @@
#!/bin/bash
+# Environment variable
+export NEXT_PUBLIC_BACK_HOST='https://server.exozy.me'
+export FRONT_PORT=5000
+export PORT=6000
+
# Build
cd front
npm run build
@@ -9,5 +14,4 @@ echo 'Build complete'
# Run
cd ../front
-env NEXT_PUBLIC_BACK_HOST='https://server.exozy.me' npm run start -- -p 5000 | \
-env PORT=6000 node ../back/dist/index.js
+npm run start -- -p $FRONT_PORT | node ../back/dist/index.js