Skip to content

Instantly share code, notes, and snippets.

@aausch
Last active December 27, 2015 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aausch/7348230 to your computer and use it in GitHub Desktop.
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)
# 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