18 lines
477 B
Bash
18 lines
477 B
Bash
#!/bin/bash
|
|
|
|
# Launch server in production or development mode
|
|
if [ "$PRODUCTION" = "true" ]; then
|
|
export REACT_APP_AI_VOICECHAT_BUILD="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
npm install
|
|
npm run build
|
|
else
|
|
export REACT_APP_AI_VOICECHAT_BUILD="Development"
|
|
npm install
|
|
if [ -f "${SSL_CERTFILE}" ] && [ -f "${SSL_KEYFILE}" ]; then
|
|
export HTTPS=true
|
|
else
|
|
echo "SSL files not found, starting frontend WS without SSL."
|
|
export HTTPS=false
|
|
fi
|
|
npm start
|
|
fi |