Skip to content

Commit fa57ab7

Browse files
committed
Add channel
1 parent a8daf7b commit fa57ab7

File tree

5 files changed

+629
-1
lines changed

5 files changed

+629
-1
lines changed

dev_server/dev_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
from sae.util import search_file_bottom_up
1717

18+
from sae.channel import _channel_wrapper
19+
1820
app_root = search_file_bottom_up('config.yaml')
1921
if app_root is None:
2022
print >> sys.stderr, \
@@ -93,6 +95,8 @@ def collect_statifiles(self):
9395
'/media': os.path.join(app_root, 'media'),
9496
'/favicon.ico': os.path.join(app_root, 'favicon.ico'),
9597
})
98+
import sae
99+
self.static_files['/_sae/channel/api.js'] = os.path.join(os.path.dirname(sae.__file__), 'channel.js')
96100

97101
if self.conf.storage:
98102
# stor dispatch: for test usage only
@@ -123,6 +127,7 @@ def _(environ, start_response):
123127
if 'WERKZEUG_RUN_MAIN' in os.environ:
124128
os.environ['sae.run_main'] = '1'
125129

130+
self.application = _channel_wrapper(self.application)
126131
from werkzeug.serving import run_simple
127132
run_simple(self.conf.host, self.conf.port,
128133
wrap(self.application),

0 commit comments

Comments
 (0)