Last active
December 27, 2015 15:29
-
-
Save aausch/7348230 to your computer and use it in GitHub Desktop.
usage demo for a StaticFileScanner resource for twisted (StaticFileScanner @ https://gist.github.com/aausch/7284664)
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
# Copyright 2013, Alex Ausch | |
# Free to use under attribution license: http://creativecommons.org/licenses/by/2.0/ca/ | |
from twisted.web.resource import Resource | |
from twisted.application import service | |
from StaticFileScanner import StaticFileScanner | |
root = Resource() | |
root.putChild('static', | |
StaticFileScanner( | |
"/path1", | |
"/path2")) | |
application = service.Application("demo") | |
internet.TCPServer(80, Site(root)).setServiceParent(application) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment