Esempio n. 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')
Esempio n. 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)
Esempio n. 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)