Skip to content

Instantly share code, notes, and snippets.

@logic
Created April 15, 2011 03:12
Show Gist options
  • Save logic/921065 to your computer and use it in GitHub Desktop.
Save logic/921065 to your computer and use it in GitHub Desktop.
Simple wrapper for running hgwebdir under mongrel2
#!/usr/bin/env python
from m2wsgi.io.standard import WSGIHandler
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb.hgwebdir_mod import hgwebdir
app = hgwebdir('/path/to/hgweb.config')
handler = WSGIHandler(app, "tcp://127.0.0.1:9999")
handler.serve()
@logic
Copy link
Author

logic commented Apr 15, 2011

This is a quick wrapper for running hgwebdir as a 0mq handler under Mongrel2, using @rfk's m2wsgi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment