how can I serve external folder with twisted?
Question: there is a captiveportal script in python that works with twisted but it load
the portal page in the script (search CAPTIVE_TEMPLATE)

<https://github.com/bendemott/captiveportal/blob/master/captiveportal>

how can I load a full index.html folder with js and css and other material
like docs and files with twisted?

best regards


Answer: Use File and pass it a directory.

    
    
    from twisted.web.server import Site
    from twisted.web.static import File
    from twisted.internet import reactor
    
    resource = File('/tmp')
    factory = Site(resource)
    reactor.listenTCP(8888, factory)
    reactor.run()
    

See more [here](http://twistedmatrix.com/documents/12.1.0/web/howto/web-
in-60/static-content.html "here")

