Skip to content

Instantly share code, notes, and snippets.

@wulab
Created June 22, 2016 23:22
Show Gist options
  • Select an option

  • Save wulab/68b305ad9e31372d37056538f9fab8bb to your computer and use it in GitHub Desktop.

Select an option

Save wulab/68b305ad9e31372d37056538f9fab8bb to your computer and use it in GitHub Desktop.
{
"version": "0.2.0",
"configurations": [
{
"name": "SimpleHTTPServer",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceRoot}/server.py",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
}
]
}
import SimpleHTTPServer
import SocketServer
HOST, PORT = "localhost", 8000
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer((HOST, PORT), Handler)
print "Serving HTTP on", HOST, "port", PORT, "..."
httpd.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment