Example #1
0
def main():
    try:
        options.parse_command_line()
        port = options.options.port
        settings.configure('PORT', port)
        SETTINGS.update(session=session_settings)
        app = web.Application(handlers=urls, debug=True, **SETTINGS)
        server = httpserver.HTTPServer(app)
        server.listen(settings.port)
        print "the server is going to start..."
        print "http://localhost:%s/" % options.options.port
        ioloop.IOLoop().instance().start()
    except Exception, e:
        print traceback.format_exc(e)
        logger.error(traceback.format_exc(e))
Example #2
0
def set_test_settings():
    settings.configure(FORCE_ENV_FOR_DYNACONF="testing")