Make frontend port and env var in run script too
This commit is contained in:
parent
a39796fc55
commit
d6d9f30562
1 changed files with 6 additions and 2 deletions
8
run
8
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
|
||||
|
|
Loading…
Reference in a new issue