Skip to content

Instantly share code, notes, and snippets.

@diversen

diversen/serv.sh

Created Sep 23, 2017
Embed
What would you like to do?
Tiny bash wrapper around built-in PHP-server in order to serv current dir. Usage: Place in a global bin dir and run serv.sh
#!/bin/sh
if [ -z "$1" ]
then
PORT=8080
fi
if [ "$1" ]
then
PORT=$1
fi
echo $PORT
php -S localhost:$PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment