<commit_before>from flask.ext.script import Command, Option

from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware

from .. import api, frontend

class RunDebug(Command):
    """Run the server in debug mode"""
    
    option_list = (
            Option('--host', '-o', dest='host', default='0.0.0.0'),
            Option('--port', '-p', dest='port', default=5000),
    )
    
    def run(self, host, port):
        application = DispatcherMiddleware(frontend.create_app(), {'/api': api.create_app()})
        run_simple(host, port, application, use_reloader=True, use_debugger=True)

class RunApp(RunDebug):
    """Run the server in development mode"""
    
    def run(self, host, port):
        application = DispatcherMiddleware(frontend.create_app(settings_override = dict(DEBUG = False)), {
            '/api': api.create_app(settings_override = dict(DEBUG = False))
        })
        run_simple(host, port, application, use_reloader=True, use_debugger=True)<commit_msg>The shouldn't use the debugger in production mode<commit_after>from flask.ext.script import Command, Option

from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware

from .. import api, frontend

class RunDebug(Command):
    """Run the server in debug mode"""
    
    option_list = (
            Option('--host', '-o', dest='host', default='0.0.0.0'),
            Option('--port', '-p', dest='port', default=5000),
    )
    
    def run(self, host, port):
        application = DispatcherMiddleware(frontend.create_app(), {'/api': api.create_app()})
        run_simple(host, port, application, use_reloader=True, use_debugger=True)

class RunApp(RunDebug):
    """Run the server in development mode"""
    
    def run(self, host, port):
        application = DispatcherMiddleware(frontend.create_app(settings_override = dict(DEBUG = False)), {
            '/api': api.create_app(settings_override = dict(DEBUG = False))
        })
        run_simple(host, port, application, use_reloader=True, use_debugger=False)
{'fraction_non_alphanumeric': 0.13368983957219252, 'fraction_numerical': 0.007778317938745746, 'mean_word_length': 3.5330396475770924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3929172', 'n_tokens_mistral': 621, 'n_tokens_neox': 610, 'n_words': 150}