aboutsummaryrefslogtreecommitdiff
path: root/serve.sh
diff options
context:
space:
mode:
authorMaZderMind2016-08-19 11:23:42 +0200
committerMaZderMind2016-08-19 11:23:42 +0200
commitc13bd57ed14da1d44426e09918700b46eb3f12b7 (patch)
treecf1cf0fbd927dcb13731bf1cfd2acb9d6cbb9517 /serve.sh
parente10fb9bb5bc69e9e93ca89280950d114d918a974 (diff)
allow specifying the serving port
Diffstat (limited to 'serve.sh')
-rwxr-xr-xserve.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/serve.sh b/serve.sh
index 88881f4..60e378b 100755
--- a/serve.sh
+++ b/serve.sh
@@ -1,2 +1,4 @@
#!/bin/sh
-php -S localhost:8000 -d short_open_tag=true index.php
+port=8000
+if [ -n "$1" ]; then port=$1; fi
+php -S localhost:$port -d short_open_tag=true index.php