skia2/tools/bug_chomper/run_server.sh
tfarina a658d368de bug_chomper: Make server's port configurable.
Make 'port' a flag so you can change it from the command line, making the
server more flexible and allowing us to change in which port it listen
to requests.

$ ./run_server.sh --port :8002

BUG=None
TEST=see above
R=borenet@google.com

Review URL: https://codereview.chromium.org/649663003
2014-10-13 12:43:01 -07:00

23 lines
586 B
Bash
Executable File

if [[ -z `which go` ]]; then
echo "Please install Go before running the server."
exit 1
fi
if [[ -z "$GOPATH" ]]; then
echo "GOPATH environment variable is not set. Please see"
echo "http://golang.org/doc/code.html#GOPATH for more information."
exit 1
fi
go get github.com/gorilla/securecookie
go get code.google.com/p/goauth2/oauth
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $DIR
if [[ ! -f oauth_client_secret.json ]]; then
gsutil cp gs://chromium-skia-gm/bugchomper/oauth_client_secret.json .
fi
GOPATH="$GOPATH:$DIR" go run $DIR/src/server/server.go $@