1
0
Fork 0
peertube/scripts/dev/client.sh

25 lines
596 B
Bash
Raw Normal View History

2020-02-19 07:56:24 +00:00
#!/bin/bash
2018-03-27 08:35:12 +00:00
set -eu
2021-06-07 15:38:31 +00:00
clientConfiguration="hmr"
if [ ! -z ${2+x} ] && [ "$2" = "--ar-locale" ]; then
clientConfiguration="ar-locale"
fi
2021-05-27 16:25:00 +00:00
clientCommand="cd client && node --max_old_space_size=4096 node_modules/.bin/ng serve --proxy-config proxy.config.json --hmr --configuration $clientConfiguration --host 0.0.0.0 --disable-host-check --port 3000"
2024-03-18 09:22:46 +00:00
serverCommand="NODE_ENV=dev node dist/server"
2020-01-07 15:53:55 +00:00
2020-02-19 08:14:28 +00:00
if [ ! -z ${1+x} ] && [ "$1" = "--skip-server" ]; then
eval $clientCommand
2020-01-07 15:53:55 +00:00
else
2024-03-15 15:49:55 +00:00
npm run build:server
node node_modules/.bin/concurrently -k \
2020-01-07 15:53:55 +00:00
"$clientCommand" \
"$serverCommand"
fi