server.sh 616 Bytes
Newer Older
1 2
#!/bin/sh

3 4 5
export PORTAL_ORIGIN=http://localhost:8081
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dbonita.portal.origin=$PORTAL_ORIGIN"

Colin PUY's avatar
Colin PUY committed
6 7 8 9 10 11 12 13 14 15 16
# CURL is needed

url=http://localhost:8080/rest/pages
waitJetty() {
  while [ $(curl -sL $url -w "%{http_code}\n"  -o /dev/nul) -ne "200" ]
  do
    sleep 1
  done
  echo "Jetty started"
}

17
echo Using $bonita.portal.origin as portal origin. You can edit it in community/server.sh
18 19 20 21
yarnCrossPlatform="yarn"
if [ "$OSTYPE" = "msys" ];then
   yarnCrossPlatform="yarn.cmd"
fi
Colin PUY's avatar
Colin PUY committed
22

23 24 25
(cd backend/webapp/ && $yarnCrossPlatform start &)
waitJetty
(cd frontend/ && $yarnCrossPlatform start)