OLD | NEW |
1 #!/bin/sh -e | 1 #!/bin/sh -e |
2 | 2 |
3 if [ ! -d "web" ]; then | 3 if [ ! -d "web" ]; then |
4 echo "Error: you must run this script from the client directory." | 4 echo "Error: you must run this script from the client directory." |
5 exit | 5 exit |
6 fi | 6 fi |
7 | 7 |
8 PUB_PATH=pub | 8 PUB_PATH=pub |
9 PUB_ARGS="serve --hostname 127.0.0.1 --port 9191" | 9 PUB_ARGS="serve --hostname 127.0.0.1 --port 9191" |
10 DART_PATH=dart | 10 DART_PATH=dart |
11 DART_ARGS="bin/server.dart --host 127.0.0.1 --port 9090" | 11 DART_ARGS="bin/server.dart --host 127.0.0.1 --port 9090" |
12 DART_ARGS="$DART_ARGS --pub-host 127.0.0.1 --pub-port 9191" | 12 DART_ARGS="$DART_ARGS --pub-host 127.0.0.1 --pub-port 9191" |
13 | 13 |
14 # Kill any child processes on exit. | 14 # Kill any child processes on exit. |
15 trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT | 15 trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT |
16 | 16 |
17 echo "This script assumes that both *pub* and *dart* are in your PATH." | 17 echo "This script assumes that both *pub* and *dart* are in your PATH." |
18 echo "Launching Observatory server." | 18 echo "Launching Observatory server." |
19 echo "Launching pub." | 19 echo "Launching pub." |
20 echo "" | 20 echo "" |
21 echo "" | 21 echo "" |
22 echo "" | 22 echo "" |
23 $DART_PATH $DART_ARGS & | 23 $DART_PATH $DART_ARGS & |
24 $PUB_PATH $PUB_ARGS | 24 $PUB_PATH $PUB_ARGS |
25 | 25 |
OLD | NEW |