Created
February 8, 2010 14:52
-
-
Save orestis/298196 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
from twisted.web.resource import Resource | |
from twisted.web.static import File | |
from twisted.web.proxy import ReverseProxyResource | |
from twisted.web.server import Site | |
from twisted.internet import reactor | |
from imageserver import ModuleImage | |
from settings import settings | |
def startServer(): | |
root = File(settings.casPath) | |
root.putChild('module_thumb', ModuleImage()) | |
root.putChild('couchdb', ReverseProxyResource(settings.couchDBHost, settings.couchDBPort, '')) | |
factory = Site(root) | |
reactor.listenTCP(8880, factory) | |
reactor.run() | |
if __name__ == '__main__': | |
startServer() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment