-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
40 lines (35 loc) · 929 Bytes
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Script name: start.sh
echo "Starting the server..."
for i in "$@"
do
case $i in
--prod)
PROD=true
shift
;;
--local)
LOCAL=true
shift
;;
*)
;;
esac
done
if [ "$PROD" = true ]; then
export NUXT_PUBLIC_BLOG_API_URL=https://blog-api.necodeo.com/api/
export NUXT_PUBLIC_IMAGES_URL=https://images.necodeo.com
export NUXT_PUBLIC_WEBSOCKET_SESSION_HOST=necodeo.com
export NUXT_PUBLIC_WEBSOCKET_ADDRESS=wss://www.necodeo.com:8090
echo "MODE: production"
elif [ "$LOCAL" = true ]; then
export NUXT_PUBLIC_BLOG_API_URL=https://blog-api.localhost/api/
export NUXT_PUBLIC_IMAGES_URL=https://images.localhost/api/v1
export NUXT_PUBLIC_WEBSOCKET_SESSION_HOST=localhost
export NUXT_PUBLIC_WEBSOCKET_ADDRESS=ws://localhost:8090
echo "MODE: local"
else
echo "Please specify either --prod or --local"
exit 1
fi
node .output/server/index.mjs