Skip to content

Instantly share code, notes, and snippets.

@orestis
Created February 8, 2010 14:52
Show Gist options
  • Save orestis/298196 to your computer and use it in GitHub Desktop.
Save orestis/298196 to your computer and use it in GitHub Desktop.
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