From 1e3ffc10382e66408b61859dd0697c655ea28c70 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Tue, 27 Aug 2013 19:15:45 -0300 Subject: [PATCH] Adding punjab.tac file --- punjab.tac | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+), 0 deletions(-) create mode 100644 punjab.tac diff --git a/punjab.tac b/punjab.tac new file mode 100644 index 0000000..cd3a3d9 --- /dev/null +++ b/punjab.tac @@ -0,0 +1,30 @@ +# punjab tac file +# tac documentation is at the following URL: +# http://twistedmatrix.com/documents/current/core/howto/application.html +from twisted.web import server, resource, static +from twisted.application import service, internet + +from punjab.httpb import Httpb, HttpbService + +root = static.File("./html") + +# uncomment only one of the bosh lines, use_raw does no xml +# parsing/serialization but is potentially less reliable +#bosh = HttpbService(1, use_raw=True) +bosh = HttpbService(1) + +# You can limit servers with a whitelist. +# The whitelist is a list of strings to match domain names. +# bosh.white_list = ['jabber.org', 'thetofu.com'] +# or a black list +# bosh.block_list = ['jabber.org', '.thetofu.com'] + +root.putChild('http-bind', resource.IResource(bosh)) + + +site = server.Site(root) + +application = service.Application("punjab") +internet.TCPServer(5280, site).setServiceParent(application) + +# To run this simply to twistd -y punjab.tac -- libgit2 0.21.2