Created
June 22, 2016 23:22
-
-
Save wulab/68b305ad9e31372d37056538f9fab8bb to your computer and use it in GitHub Desktop.
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "SimpleHTTPServer", | |
| "type": "python", | |
| "request": "launch", | |
| "stopOnEntry": false, | |
| "program": "${workspaceRoot}/server.py", | |
| "debugOptions": [ | |
| "WaitOnAbnormalExit", | |
| "WaitOnNormalExit", | |
| "RedirectOutput" | |
| ] | |
| } | |
| ] | |
| } |
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
| 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