Last active
August 29, 2015 14:14
-
-
Save japboy/05faf9bec892ceafeb77 to your computer and use it in GitHub Desktop.
A script to launch local servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CWD=$(pwd) | |
function ctrl_c () { | |
#pgrep -f mongod && pkill mongod | |
pgrep -f mysql && mysql.server stop | |
cd ${CWD} | |
unset CWD | |
unset -f ctrl_c | |
} | |
trap ctrl_c SIGINT | |
#mongod --config $(brew --prefix)/etc/mongod.conf & | |
mysql.server start | |
[[ ! -z "${1}" && -d ${1} ]] && cd ${1} | |
#python -m SimpleHTTPServer 8080 | |
#ruby -run -e httpd . -p 8080 | |
php -S 0.0.0.0:8080 | |
#wzrd app.js:bundle.js -p 8080 -- -t 6to5ify --extension=".js" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment