Merge scripts into a single run script

This commit is contained in:
Anthony Wang 2022-01-13 12:21:20 -06:00
parent 547a46697a
commit aad9977d79
Signed by: a
GPG key ID: BC96B00AEC5F2D76
3 changed files with 10 additions and 12 deletions

6
build
View file

@ -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

4
env
View file

@ -1,3 +1 @@
PORT=6000
NEXT_PUBLIC_BACK_HOST='https://server.exozy.me'
ORIGIN="*"

12
run
View file

@ -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