예제 #1
0
def start():
    if __INITIALIZED__:

        start_schedules()

        if not DEVELOPMENT:
            try:
                logger.log('Starting Maraschino on port: %i' % PORT, 'INFO')
                SERVER.start()
                while not True:
                    pass
            except KeyboardInterrupt:
                stop()
        else:
            logger.log('Starting Maraschino development server on port: %i' % PORT, 'INFO')
            app.run(debug=True, port=PORT, host='0.0.0.0')
예제 #2
0
def start():
    if __INITIALIZED__:

        start_schedules()

        if not DEVELOPMENT:
            try:
                logger.log('Starting Maraschino on %s:%i%s' % (HOST, PORT, WEBROOT), 'INFO')
                SERVER.start()
                while not True:
                    pass
            except KeyboardInterrupt:
                stop()
        else:
            logger.log('Starting Maraschino development server on port: %i' % (PORT), 'INFO')
            logger.log(' ##### IMPORTANT : WEBROOT DOES NOT WORK UNDER THE DEV SERVER #######', 'INFO')
            app.run(debug=True, port=PORT, host=HOST)
예제 #3
0
def start():
    """Start the actual server"""
    if __INITIALIZED__:

        start_schedules()

        if not DEVELOPMENT:
            try:
                logger.log(
                    'Starting Maraschino on %s:%i%s' % (HOST, PORT, WEBROOT),
                    'INFO')
                SERVER.start()
                while not True:
                    pass
            except KeyboardInterrupt:
                stop()
        else:
            logger.log(
                'Starting Maraschino development server on port: %i' % (PORT),
                'INFO')
            logger.log(
                ' ##### IMPORTANT : WEBROOT DOES NOT WORK UNDER THE DEV SERVER #######',
                'INFO')
            app.run(debug=True, port=PORT, host=HOST)