server/main.py
def make_app():
    """
    Main entry point for app
    Create a MotorClient and assign it to the settings for the Application.
    From the Motor Documentation:
      Warning It is a common mistake to create a new client object for every request;
      this comes at a dire performance cost. Create the client when your application
      starts and reuse that one client for the lifetime of the process,
      as shown in these examples.
    """
    server = config.dbServer
    user = urllib.parse.quote_plus(config.dbUser)
    password = urllib.parse.quote_plus(config.dbPassword)
    dbUri = 'mongodb://{0}:{1}@{2}'.format(user, password, server)
    db = MotorClient(dbUri)[config.database_name]

    return tornado.web.Application([
        (r"/api/auth", AuthHandler),
        (r"/api/event/(.+)", EventHandler),
        # (r"/api/event/(?P<id>[^\/]+])?/", EventHandler),
        (r"/api/vote", VoteHandler),
        (r"/api/ws/votes",  VoteSocketHandler),
        (r"/api/events", EventsHandler)
    ], db=db,
    debug=True)

    Main entry point for app
    Create a MotorClient and assign it to the settings for the Application.
    From the Motor Documentation:
      Warning It is a common mistake to create a new client object for every request;
      this comes at a dire performance cost. Create the client when your application
      starts and reuse that one client for the lifetime of the process,
      as shown in these examples.
    
Main entry point for app
Create a MotorClient and assign it to the settings for the Application.
From the Motor Documentation:
Warning It is a common mistake to create a new client object for every request;
this comes at a dire performance cost. Create the client when your application
starts and reuse that one client for the lifetime of the process,
as shown in these examples.
Main entry point for app Create a MotorClient and assign it to the settings for the Application . From the Motor Documentation : Warning It is a common mistake to create a new client object for every request ; this comes at a dire performance cost . Create the client when your application starts and reuse that one client for the lifetime of the process as shown in these examples .
def make_app():
    server = config.dbServer
    user = urllib.parse.quote_plus(config.dbUser)
    password = urllib.parse.quote_plus(config.dbPassword)
    dbUri = 'mongodb://{0}:{1}@{2}'.format(user, password, server)
    db = MotorClient(dbUri)[config.database_name]
    return tornado.web.Application([
        (r"/api/auth", AuthHandler),
        (r"/api/event/(.+)", EventHandler),
        (r"/api/vote", VoteHandler),
        (r"/api/ws/votes",  VoteSocketHandler),
        (r"/api/events", EventsHandler)
    ], db=db,
    debug=True)
def make_app ( ) : server = config . dbServer user = urllib . parse . quote_plus ( config . dbUser ) password = urllib . parse . quote_plus ( config . dbPassword ) dbUri = 'mongodb://{0}:{1}@{2}' . format ( user , password , server ) db = MotorClient ( dbUri ) [ config . database_name ] return tornado . web . Application ( [ ( r"/api/auth" , AuthHandler ) , ( r"/api/event/(.+)" , EventHandler ) , ( r"/api/vote" , VoteHandler ) , ( r"/api/ws/votes" , VoteSocketHandler ) , ( r"/api/events" , EventsHandler ) ] , db = db , debug = True )
Main entry point for app
Create a MotorClient and assign it to the settings for the Application.
Main entry point for app Create a MotorClient and assign it to the settings for the Application .
"""
    Main entry point for app
    Create a MotorClient and assign it to the settings for the Application.
    From the Motor Documentation:
      Warning It is a common mistake to create a new client object for every request;
      this comes at a dire performance cost. Create the client when your application
      starts and reuse that one client for the lifetime of the process,
      as shown in these examples.
    """ # (r"/api/event/(?P<id>[^\/]+])?/", EventHandler),