Skip to content

Instantly share code, notes, and snippets.

@leoleozhu
Created January 26, 2014 05:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save leoleozhu/8629012 to your computer and use it in GitHub Desktop.
Save leoleozhu/8629012 to your computer and use it in GitHub Desktop.
SimpleHTTPServer different port
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
# minimal web server. serves files relative to the
# current directory.
PORT = 8080
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
print "serving at port", PORT
httpd.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment