Skip to content

Commit

Permalink
update app
Browse files Browse the repository at this point in the history
  • Loading branch information
reorx committed Feb 24, 2013
1 parent 225749e commit a554a92
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions chatroom/app.py
Expand Up @@ -9,16 +9,25 @@
import logging
from bson.objectid import ObjectId
import tornado.web

from torext import errors, params
from torext.app import TorextApp
from torext.utils import _json
from torext.handlers import BaseHandler as _BaseHandler

import pymongo.errors
from pymongo import Connection


app = TorextApp()
app.set_root_path()
print 'root', app.root_path
app.update_settings(dict(
COOKIE_SECRET='P0UTa5iuRaaVlV8QZF2uVR7hHwTOSkQhg2Fol18OKwc=',
TEMPLATE_PATH='templates',
PORT=os.environ.get('PORT', '8001')
))
app.setup()


mongodb_uri = os.getenv('MONGOHQ_URL', 'mongodb://localhost:27017')
logging.info('mongodb uri: %s', mongodb_uri)
try:
Expand Down Expand Up @@ -412,15 +421,6 @@ def get(self):
time.sleep(30)


app = TorextApp()
app.set_root_path()
print 'root', app.root_path
app.update_settings(dict(
COOKIE_SECRET='P0UTa5iuRaaVlV8QZF2uVR7hHwTOSkQhg2Fol18OKwc=',
TEMPLATE_PATH='templates',
PORT=os.environ.get('PORT', '8001')
))

app.route_many([
(r"/", HomeHandler),
(r"/auth/login", LoginHdr),
Expand Down

0 comments on commit a554a92

Please sign in to comment.