Created
June 7, 2017 11:31
-
-
Save alecordev/b154f003edaa8b8415ec063ed4221b60 to your computer and use it in GitHub Desktop.
Simple Twisted Server in Current Directory
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 sys | |
from twisted.web.static import File | |
from twisted.python import log | |
from twisted.web.server import Site | |
from twisted.internet import reactor | |
log.startLogging(sys.stdout) | |
root = File('.') | |
site = Site(root) | |
reactor.listenTCP(8080, site) | |
reactor.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment