Last active
August 29, 2015 14:15
-
-
Save davidhq/fe7443c4923a8c290d56 to your computer and use it in GitHub Desktop.
Ultimate web server
This file contains hidden or 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
function serve { | |
if [ -f ./server ]; then | |
./server | |
elif [ -f ./server.js ]; then | |
node server.js | |
elif [ -f ./package.json ]; then | |
npm run start | |
else | |
# npm install http-server -g | |
http-server -p 3000 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment