aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-09-21 14:03:08 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-09-26 16:28:09 +0100
commit371927debffc6bb42d8d86a90afc715d1d837e74 (patch)
tree28fab8afb25b4d8f2b84da7c1f114f1dee861f4b /script
parent7d7733f6d674bc3aff4ffd5b9cbad7c448e82b04 (diff)
Switch to direct app server, not FastCGI.
Diffstat (limited to 'script')
-rwxr-xr-xscript/server14
1 files changed, 11 insertions, 3 deletions
diff --git a/script/server b/script/server
index a8093fb8e..2fc15eb02 100755
--- a/script/server
+++ b/script/server
@@ -1,7 +1,15 @@
-#!/bin/sh
+#!/bin/bash
+#
+# By default, if no arguments given, runs a server on port 3000 with
+# auto-reloading, and debug switched on. Run with FIXMYSTREET_APP_DEBUG=0 to
+# override debug, or provide arguments to override everything.
set -e
cd "$(dirname "$0")/.."
-export FIXMYSTREET_APP_DEBUG=${FIXMYSTREET_APP_DEBUG=1}
-bin/cron-wrapper local/bin/plackup -s Starman --listen :3000 --Reload perllib,conf
+if [ -z "$1" ]; then
+ export FIXMYSTREET_APP_DEBUG=${FIXMYSTREET_APP_DEBUG=1}
+ set -- --listen :3000 --Reload perllib,conf
+fi
+
+bin/cron-wrapper local/bin/plackup -s Starman $@