From aad9977d79cd0e50c06ba4970de80265b9ad86c3 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Thu, 13 Jan 2022 12:21:20 -0600 Subject: Merge scripts into a single run script --- build | 6 ------ env | 4 +--- run | 12 +++++++++--- 3 files changed, 10 insertions(+), 12 deletions(-) delete mode 100755 build diff --git a/build b/build deleted file mode 100755 index b88321a..0000000 --- a/build +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -export $(cat env | xargs) # Read env variables from file -cd front -npm run build -cd ../back -npm run build diff --git a/env b/env index eea8d97..8b13789 100644 --- a/env +++ b/env @@ -1,3 +1 @@ -PORT=6000 -NEXT_PUBLIC_BACK_HOST='https://server.exozy.me' -ORIGIN="*" + diff --git a/run b/run index 75c7d22..a51ef12 100755 --- a/run +++ b/run @@ -1,5 +1,11 @@ #!/bin/bash -export $(cat env | xargs) # Read env variables from file -./build + +# Build cd front -npm run start -- -p 5000 | node ../back/dist/index.js +npm run build +cd ../back +npm run build + +# Run +cd ../front +npm run start -- -p 5000 | env PORT=6000 NEXT_PUBLIC_BACK_HOST='https://server.exozy.me' node ../back/dist/index.js -- cgit v1.2.3-70-g09d2