-
-
Save jdrew1303/48fe7c97c2f5bb253924 to your computer and use it in GitHub Desktop.
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
# Start an HTTP server from a directory, optionally specifying the port | |
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" | |
# Set the default Content-Type to `text/plain` instead of `application/ | |
# And serve everything as UTF-8 (although not technically correct, this | |
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTP | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment