from twisted.web import server, resource, static
from twisted.application import service, internet

from punjab.httpb import Httpb, HttpbService

root = static.File("%%WWWDIR%%") # a static html directory

b = resource.IResource(HttpbService(1)) # 1 means turn on verbose mode.
root.putChild('bosh', b) # url for BOSH

site  = server.Site(root)

application = service.Application("punjab")
internet.TCPServer(5280, site).setServiceParent(application)
