Beispiel #1
0
 def get_app(self):
     # Generate a real application server based on our test config data
     cfg = runserver.getConfigObject(
         'hooky.config.file.FileConfig',
         '%s/test_data/config.ini' % utils.getRootPath())
     server = app.getApplication(cfg)
     return server
Beispiel #2
0
def main():
    # Set up logging
    log = getRootLogger(options.level, options.syslog)

    # Create our configuration object
    log.debug('Building config object...')
    cfg = getConfigObject(options.config_module, options.config_file)

    # Build the HTTP service listening to the port supplied
    server = app.getApplication(cfg)
    server.listen(int(options.port))
    ioloop.IOLoop.instance().start()