Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
import os | ||
from subprocess import Popen | ||
import sys | ||
|
||
from twisted.internet import reactor | ||
from twisted.web import proxy, server | ||
|
||
from django.core.management.base import BaseCommand | ||
from django.conf import settings | ||
|
||
from hurricane.runner import main | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Starts a lightweight Comet server for development." | ||
help = ("Starts a lightweight Comet server, and django development server " | ||
"for development.") | ||
|
||
def handle(self, *args, **options): | ||
main(settings) | ||
Popen([ | ||
sys.executable, | ||
sys.argv[0], | ||
'runserver', | ||
'--settings=%s' % settings.SETTINGS_MODULE | ||
]) | ||
Popen([ | ||
sys.executable, | ||
os.path.join(os.path.dirname(__file__), '..', 'runner.py'), | ||
'--settings=%' % settings.SETTINGS_MODULE | ||
]) | ||
|
||
main_site = proxy.ReverseProxyResource('localhost', 8000, '') | ||
main_site.putChild('comet/', | ||
proxy.ReverseProxyResource('localhost', 8001, 'comet/')) | ||
reactor.listenTCP(8080, server.Site(main_site)) | ||
reactor.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
simplejson | ||
http://stomppy.googlecode.com/files/stomp.py-2.0.2.tar.gz | ||
-e git://github.com/facebook/tornado.git#egg=tornado | ||
-e git://github.com/ericflo/twitstream.git#egg=twitstream | ||
-e git://github.com/ericflo/twitstream.git#egg=twitstream | ||
Twisted==8.2.0 |