コード例 #1
0
ファイル: run.py プロジェクト: miscoined/viz-alg
def main(argv):
    """Read command line options and run app accordingly.

    Reads arguments from argv and applies relevant options.
    Args:
        argv (list): Output from sys.argv excluding first item.
    """

    from getopt import getopt, GetoptError

    # Get options and arguments from argv
    try:
        opts, args = getopt(argv, "d", ["debug"])
    except GetoptError:
        print("usage: run.py [-d] [--debug]")
        sys.exit()

    # Set options
    for opt, arg in opts:
        if opt == "-d":
            debug = True

    # Run the script
    try:
        app.run(debug=debug)
    except NameError:
        app.run()
コード例 #2
0
ファイル: flask_runner.py プロジェクト: adevore/Flask-Runner
    def handle(self, app, host, port, use_debugger, use_reloader,
               threaded, processes, passthrough_errors, use_evalex,
               extra_files, profile, profile_restrictions, profile_dir, lint):
        # we don't need to run the server in request context
        # so just run it directly

        if profile:
            from werkzeug.contrib.profiler import ProfilerMiddleware
            app.wsgi_app = ProfilerMiddleware(app.wsgi_app,
                restrictions = profile_restrictions, profile_dir = profile_dir)

        if lint:
            from werkzeug.contrib.lint import LintMiddleware
            app.wsgi_app = LintMiddleware(app.wsgi_app)

        app.run(host = host,
                port = port,
                use_debugger = use_debugger,
                use_reloader = use_reloader,
                threaded = threaded,
                processes = processes,
                passthrough_errors = passthrough_errors,
                use_evalex = use_evalex,
                extra_files = extra_files,
                **self.server_options)
コード例 #3
0
def webserver(options, reload=False):
    from app import app
    print "Running server"
    if reload:
        # Con flask
        print "Trabajando con flask stand-alone"
        import gevent.wsgi
        from gevent import monkey
        import werkzeug.serving
        werkzeug.serving
        # http://flask.pocoo.org/snippets/34/ (2nd comment)
        monkey.patch_all()

        @werkzeug.serving.run_with_reloader
        def runServer():
            app.debug = True
            ws = gevent.wsgi.WSGIServer(('', options.port), app)
            ws.serve_forever()

        app.run()

    else:
        # Con Twisted
        from resources import site
        from twisted.internet import reactor

        from models import COMaster
        for x in COMaster.select():
            print x

        reactor.listenTCP(options.port, site) #@UndefinedVariable
        reactor.callLater(1, functools.partial(open_local_browser, port=options.port))    #@UndefinedVariable
        print "Iniciando servidor en http://0.0.0.0:%s" % options.port
        reactor.run() #@UndefinedVariable
コード例 #4
0
ファイル: manage.py プロジェクト: cldershem/homelessgaffer
def run():
    """Runs development server.  Replaces run.py"""
    app.config.update(dict(
        DEBUG=True,
        TESTING=True,
        ))
    app.run()
コード例 #5
0
ファイル: run.py プロジェクト: fake-name/wlnupdates
def go():
	import sys


	if "debug" in sys.argv:
		from gevent.pywsgi import WSGIServer
		print("Running in debug mode.")
		app.run(host='0.0.0.0')

	else:

		import cherrypy
		import logging


		def fixup_cherrypy_logs():
			loggers = logging.Logger.manager.loggerDict.keys()
			for name in loggers:
				if name.startswith('cherrypy.'):
					print("Fixing %s." % name)
					logging.getLogger(name).propagate = 0


		cherrypy.tree.graft(app, "/")
		cherrypy.server.unsubscribe()

		# Instantiate a new server object
		server = cherrypy._cpserver.Server()
		# Configure the server object
		if "all" in sys.argv:
			server.socket_host = "0.0.0.0"
		else:
			server.socket_host = "127.0.0.1"

		server.socket_port = 5000
		server.thread_pool = 8

		# For SSL Support
		# server.ssl_module            = 'pyopenssl'
		# server.ssl_certificate       = 'ssl/certificate.crt'
		# server.ssl_private_key       = 'ssl/private.key'
		# server.ssl_certificate_chain = 'ssl/bundle.crt'

		# Subscribe this server
		server.subscribe()

		# fixup_cherrypy_logs()

		if hasattr(cherrypy.engine, 'signal_handler'):
			cherrypy.engine.signal_handler.subscribe()
		# Start the server engine (Option 1 *and* 2)
		cherrypy.engine.start()
		cherrypy.engine.block()
		# fixup_cherrypy_logs()



	print()
	print("Interrupt!")
	print("Thread halted. App exiting.")
コード例 #6
0
def web_devserver(host, port, debug):
    "Run the web app with the Flask development server"
    app.run(
        host=host,
        port=port,
        debug=debug,
    )
コード例 #7
0
ファイル: runserver.py プロジェクト: gzxultra/cabal
def main():
    try:
        port = int(sys.argv[1])
    except:
        print 'Usage:\n\t./runserver port'
        sys.exit(1)
    app.run(host='0.0.0.0', debug=True, port=port)
コード例 #8
0
ファイル: run.py プロジェクト: SeoWonHyeong/cherry-card
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('-p', '--port', type=int, default=5000)

    args = parser.parse_args()

    app.run(host='0.0.0.0', port=args.port, threaded=True)
コード例 #9
0
ファイル: run.py プロジェクト: alexander-bauer/deschedule
def main(args):
    from app import app
    app.config['SQLALCHEMY_DATABASE_URI'] = args.db
    app.config['SQLALCHEMY_MIGRATE_REPO'] = args.migrate
    app.config['HOST'] = args.host
    app.config['PORT'] = args.port
    version = None
    try:
        with open('VERSION', 'r') as f:
            version = f.read().strip()
    except FileNotFoundError:
        pass
    if not version:
        try:
            version = subprocess.check_output(
                    ['git', 'describe', '--always', '--dirty=+']).decode('UTF-8')
        except:
            pass

    if version:
        app.config['VERSION'] = version
        app.logger.info('Running Deschedule version ' + version)
    else:
        app.logger.warn('Could not get version from file or command')

    app.config.from_object(args.config)

    if args.create:
        from app import db
        db.create_all()

    app.run(host=app.config['HOST'], port=app.config['PORT'], debug=args.debug)
コード例 #10
0
def run():
    """
    Run the server.
    """

    # Set up the logger.
    if not os.path.isdir(os.path.join(script_dir, 'logs')):
        os.makedirs(os.path.join(script_dir, 'logs'))
    # Format the logs.
    formatter = logging.Formatter(
            "%(asctime)s - %(name)s - %(levelname)s - %(message)s")
    # Enable the logs to split files at midnight.
    handler = TimedRotatingFileHandler(
            os.path.join(script_dir, 'logs', 'TorSpider.log'),
            when='midnight', backupCount=7, interval=1)
    handler.setLevel(app.config['LOG_LEVEL'])
    handler.setFormatter(formatter)
    log = logging.getLogger('werkzeug')
    log.setLevel(app.config['LOG_LEVEL'])
    log.addHandler(handler)
    app.logger.addHandler(handler)
    app.logger.setLevel(app.config['APP_LOG_LEVEL'])

    # Set up the app server, port, and configuration.
    port = int(environ.get('PORT', app.config['LISTEN_PORT']))
    addr = environ.get('LISTEN_ADDR', app.config['LISTEN_ADDR'])
    if app.config['USETLS']:
        context = (app.config['CERT_FILE'], app.config['CERT_KEY_FILE'])
        app.run(host=addr, port=port, threaded=True, ssl_context=context)
    else:
        app.run(host=addr, port=port, threaded=True)
コード例 #11
0
ファイル: server_run.py プロジェクト: dboyliao/Learn_Flask
def main():
    if len(sys.argv) > 1:
        port = int(sys.argv[2])
    else:
        port = 3000

    app.run(port = port, debug = True)
コード例 #12
0
ファイル: run.py プロジェクト: msampathkumar/smapp
def run_app():
    fqdn = getfqdn()
    Bootstrap(app)
    if 'scb' in fqdn:
        app.run(debug=True)
    else:
        app.run()
コード例 #13
0
ファイル: webapp.py プロジェクト: terbo/sigmon
def main():
  app.run(
          host='0.0.0.0',
          port=8080,
          #ssl_context=('etc/ssl/dev.sigmon.net.crt','etc/ssl/dev.sigmon.net.key'),
          debug=True,
          threaded=False,
          processes=5)
コード例 #14
0
ファイル: run.py プロジェクト: kevinyu/bearded-octo-robot
def main():
    db.connect()
    setup_tables()
    register_blueprints()

    app.run(debug=config.DEBUG,
        host="0.0.0.0",
        port=int(os.environ.get("PORT", 5912)))
コード例 #15
0
ファイル: __init__.py プロジェクト: tsk/ProxyPoS
 def run(self):
     self.logger.info("Listening on http://%s:%s/" % (self.host, self.port))
     #Enable read configuration generated by the GUI
     set_config_from_gui()
     try:
         app.run(server=self.server,quiet=True)
     except Exception, ex:
         self.logger.error(ex)
コード例 #16
0
ファイル: runserver.py プロジェクト: guedressel/smb4manager
def flask_http(debug=False, ssl=False):
    if (ssl):
        from OpenSSL import SSL
        context = SSL.Context(SSL.SSLv23_METHOD)
        context.use_privatekey_file('ssl/server.key')
        context.use_certificate_file('ssl/server.crt')
        app.run(host='0.0.0.0', port=8010, debug=debug, ssl_context=context)
    else:
        app.run(host='0.0.0.0', port=8010, debug=debug)
コード例 #17
0
ファイル: manage.py プロジェクト: defhook/flask-blog
def profile(length, profile_dir):
    """Start the application under the code profiler."""
    # 使用 python manage.py profile 启动程序后,终端会显示每条请求的分析数据,其中包含运行最慢的 25 个函数。
    # --length 选项可以修改报告中显示的函数数量
    # 如果指定了--profile-dir 选项,每条请求的分析数据就会保存到指定目录下的一个文件中
    from werkzeug.contrib.profiler import ProfilerMiddleware
    app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[length],
                                      profile_dir=profile_dir)
    app.run()
コード例 #18
0
def _start(args):
    """
    Add args.path to sys.path
    import app
    app.run()
    """
    sys.path.insert(0, args.path)
    from app import app
    app.run(args.host, args.port)
コード例 #19
0
ファイル: run.py プロジェクト: LarryEitel/flask_seed
def run():
    app.host = sys.argv['-h'] if '-h' in sys.argv else '127.0.0.1'
    if '-t' in sys.argv:
        app.config['TESTING'] = True
        print 'Running in test mode.'
    app.debug = '-d' in sys.argv
    app.use_reloader = '-r' in sys.argv

    app.g = globals.load()
    app.run()
コード例 #20
0
ファイル: run.py プロジェクト: ndhanpal/pysalREST
def main():
    config = _get_config()

    if config['server'] == 'cherry':
        #Run the stable, cherrypy server
        from cherry import start
    	start()
    else:
        #Run the development server
        app.run(host=config['host'], port=config['port'], debug=config['DEBUG'])
コード例 #21
0
def main(argv=None):
  parser = get_argument_parser()
  args = parser.parse_args(argv)
  if args.external:
    HOST="0.0.0.0"
  else:
    HOST="localhost"
  PORT=args.port
  DEBUG=args.debug
  app.run(host=HOST, port=PORT, debug=DEBUG)
コード例 #22
0
def main():
    # Set up logging
    logging.basicConfig(format='%(asctime)s - %(levelname)s %(funcName)s() - %(message)s',
                        filename=config.log_file_name,
                        level=config.log_level)
    logging.info('-- Starting the Software Assessment Framework --')

    app.config['WTF_CSRF_ENABLED'] = False
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
    app.run(host=config.host, port=config.port, debug=True)
コード例 #23
0
ファイル: run.py プロジェクト: WilCrofter/deschedule
def main(args):
    from app import app
    app.config['SQLALCHEMY_DATABASE_URI'] = args.db
    app.config['SQLALCHEMY_MIGRATE_REPO'] = args.migrate
    app.config.from_object(args.config)

    if args.create:
        from app import db
        db.create_all()

    app.run(host=args.host, port=args.port, debug=args.debug)
コード例 #24
0
ファイル: command.py プロジェクト: muromec/texr.client
def main():
    username = os.getenv("TEXR_USER")
    if username is None:
        username = os.getenv("USER")

    if username is None:
        print "Dont know who I am, can't start!"
        return

    app.me(username)
    app.run()
コード例 #25
0
def run():
    print("""
    +===================================+
    ¦   Parkwood Vale Harriers Webapp   ¦
    +===================================+
    ¦   Stop the application by either  ¦
    ¦   closing the console window, or  ¦
    ¦         pressing CTRL+C.          ¦
    +===================================+
    ¦    Made by Christopher Stevens    ¦
	¦      GITHUB/PUBLIC VERSION        ¦
    +===================================+
    """)
    app.run(debug=True, use_reloader=False)
コード例 #26
0
ファイル: server.py プロジェクト: achad4/chello
  def run(debug, threaded, host, port):
    """
    This function handles command line parameters.
    Run the server using:

        python server.py

    Show the help text using:

        python server.py --help

    """

    HOST, PORT = host, port
    print "running on %s:%d" % (HOST, PORT)
    app.run(host=HOST, port=PORT, debug=True, threaded=threaded)
コード例 #27
0
ファイル: run_app.py プロジェクト: vierja/docker-hadoop
def main():
    parser = optparse.OptionParser("usage: %prog [options]")
    parser.add_option(
        "-b", "--bind", dest="bind_addr", metavar="ADDR", help="IP addr or hostname to bind to (defaults to 0.0.0.0)"
    )
    parser.add_option(
        "-p", "--port", dest="port", type="int", metavar="PORT", help="port to bind to (defaults to 9090)"
    )

    (options, args) = parser.parse_args()

    app.config["BIND_ADDR"] = options.bind_addr or app.config.get("BIND_ADDR", "0.0.0.0")
    app.config["PORT"] = options.port or app.config.get("PORT", 9090)

    print("Docker Hadoop Dashboard, version %s" % VERSION)
    app.run(host=app.config["BIND_ADDR"], port=app.config["PORT"], debug=True)
コード例 #28
0
ファイル: run.py プロジェクト: myedibleenso/psycholing
def flaskrun(app,
             default_host="127.0.0.1",
             default_port="5000"):
    """
    Takes a flask.Flask instance and runs it. Parses
    command-line flags to configure the app.
    """

    # Set up the command-line options
    parser = optparse.OptionParser()
    parser.add_option("-H", "--host",
                      help="Hostname of the Flask app " + \
                           "[default %s]" % default_host,
                      default=default_host)
    parser.add_option("-P", "--port",
                      help="Port for the Flask app " + \
                           "[default %s]" % default_port,
                      default=default_port)

    # Two options useful for debugging purposes, but
    # a bit dangerous so not exposed in the help message.
    parser.add_option("-d", "--debug",
                      action="store_true", dest="debug",
                      help=optparse.SUPPRESS_HELP)
    parser.add_option("-p", "--profile",
                      action="store_true", dest="profile",
                      help=optparse.SUPPRESS_HELP)

    options, _ = parser.parse_args()

    # If the user selects the profiling option, then we need
    # to do a little extra setup
    if options.profile:
        from werkzeug.contrib.profiler import ProfilerMiddleware

        app.config['PROFILE'] = True
        app.wsgi_app = ProfilerMiddleware(app.wsgi_app,
                       restrictions=[30])
        options.debug = True

    app.run(
        debug=options.debug,
        host=options.host,
        port=int(options.port)
    )
コード例 #29
0
ファイル: test.py プロジェクト: susmus/flask-testing-skeleton
    def _spawn_live_server(self):
        self._process = None
        self.port = self.app.config.get('LIVESERVER_PORT', 8943)

        worker = lambda app, port: app.run(port=port, use_reloader=False, debug=True)

        self._process = multiprocessing.Process(
            target=worker, args=(self.app, self.port)
        )

        self._process.start()
        time.sleep(1)
コード例 #30
0
ファイル: __init__.py プロジェクト: tsk/ProxyPoS
def main():
    # Set default configuration
    port = '8069'
    path = 'config/proxypos.yaml'
    # Start logg
    setup_logging()
    # Interactive mode
    logger = logging.getLogger(__name__)
    logger.info("ProxyPos server starting up...")

    if os.path.exists(path):
        with open(path, 'rt') as f:
            config = yaml.load(f.read())
        port = config['port']

    logger.info("Listening on http://%s:%s/" % ('localhost', port))
    server = WSGIRefServerAdapter(host='localhost',port=port)
    try:
        app.run(server=server,quiet=True)
    except Exception, ex:
        print ex
コード例 #31
0
from app import app
from arguments import args

if __name__ == '__main__':
    print(f'Arguments: {args}')
    options = dict(
        host='0.0.0.0',
        debug=args.debug,
        port=args.port,
        threaded=True
    )

    app.run(**options)
コード例 #32
0
ファイル: manage.py プロジェクト: kangah-codes/airpoll
def run():
	app.run(debug=True)
コード例 #33
0
ファイル: run.py プロジェクト: zalalov/payment-mvp
from app import app, db
from models import User, Currency
from config import get_configuration

if __name__ == '__main__':
    # from events import create_event
    # from users import create_user
    #
    # create_user('ruslan', '123')
    #
    # ruslan = db.session.query(User).get(2)
    # admin = db.session.query(User).get(1)
    #
    # usd = db.session.query(Currency).filter(Currency.ticker=='USD').one()
    # eur = db.session.query(Currency).filter(Currency.ticker=='EUR').one()
    # cny = db.session.query(Currency).filter(Currency.ticker=='CNY').one()
    #
    # # create_event(ruslan, ruslan.get_account_by_currency(usd), admin.get_account_by_currency(usd), 10)
    # create_event(ruslan, ruslan.get_account_by_currency(usd), admin.get_account_by_currency(eur), 10)

    configuration = get_configuration()

    app.run(host=configuration.APP_HOST, port=configuration.APP_PORT)
コード例 #34
0
from app import app

#app.config['JSONIFY_PRETTYPRINT_REGULAR'] = True
app.run(debug=True, port=8888)
コード例 #35
0
from app import app

if __name__ == "__main__":
    app.run(debug=True, port=3000)


コード例 #36
0
ファイル: main.py プロジェクト: imishin1/Business_card_site
from app import app
import view

if __name__ == "__main__":
    app.run() # запускает метод run в экземпляре класса Flask
コード例 #37
0
"""
Flask Web App - Generated by www.AppSeed.us
AppSeed - developed by RoSoft | www.RoSoftware.ro
Licence: MIT
"""

import os
from app     import app #import flask app
from app     import db  #import db
from app     import admin
from app.cli import create_user  #import cli functions

#----------------------------------------
# launch
#----------------------------------------

# This Code will be executed if app is started using python:
# python ./app.py 
if __name__ == "__main__":
	
	# schema it's created based on classes defined in models.py 
	db.create_all()

	# create a test user using 
	# create_user( email, username, password)
	create_user( '*****@*****.**', 'appseed', 'pass')

	port = int(os.environ.get("PORT", 5000))
	app.run(host='127.0.0.1', port=port, debug=True)
	
コード例 #38
0
from app import app
from app.routes import*

if __name__ == '__main__':
    app.run(debug=True)
コード例 #39
0
from app import app, db
from app.models import User, Post


@app.shell_context_processor
def make_shell_context():
    return {'db': db, 'User': User, 'Post': Post}


if __name__ == "__main__":
    app.run(host="0.0.0.0", port="4444")
コード例 #40
0
from app import app

if __name__ == '__main__':
    app.run("127.0.0.1", 8088)
コード例 #41
0
ファイル: run.py プロジェクト: kush-daga/twitterNews
import os
from app import app

if __name__ == "__main__":
    app.secret_key = os.urandom(12)
    app.run(host="0.0.0.0", debug=True, port=4000)
コード例 #42
0
ファイル: run.py プロジェクト: matfurrier/pesquisa_pre-os_py
from app import app

app.run(debug=app.config['DEBUG'], port=4990)
コード例 #43
0
ファイル: main.py プロジェクト: OmarDTech/PC-Part-Finder
  
    
    

@app.route('/results')
def search_results(search):
    current_prices()
    res2 = dict(filter(lambda item: search.data['search'] in item[0], dictionary.items()))
    results = []
    search_string = search.data['search']

    if search.data['search'] == '':
        for key, value in res2.items():
            qry = db_session.query(Price)
            results = res2.all()

    if not results:
        flash('No results found!')
        return redirect('/')
    else:
        # display results
        return render_template('results.html', table=table)


if __name__ == '__main__':
    import os
    if 'WINGDB_ACTIVE' in os.environ:
        app.debug = False
    app.run(port=5001)
コード例 #44
0
ファイル: deployer.py プロジェクト: seven2221/deployer
# -*- coding: utf-8 -*-
from app import app
from app.config import Config

app.run(host=Config.host)


# from app import app, db
# from app.models import User
#
# @app.shell_context_processor
# def make_shell_context():
#     return {'db': db, 'User': User}
コード例 #45
0
ファイル: run2.py プロジェクト: melquelima/arcadeCard
import os
from app import app,SQLAlchemy,db

#app.config['SQLALCHEMY_DATABASE_URI'] = app.config['SQLALCHEMY_DATABASE_HEROKU']
#db = SQLAlchemy(app)

if __name__ == "__main__":
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)
    #app.run()
コード例 #46
0
ファイル: run.py プロジェクト: rgzfx/climatempo_api
from app import app

app.run(debug=True, port=3000, host="0.0.0.0")
コード例 #47
0
# Port variable to run the server on.
PORT = os.environ.get('PORT')


@app.errorhandler(404)
def not_found(error):
    """ error handler """
    LOG.error(error)
    return make_response(jsonify({'error': 'Not found'}), 404)


@app.route('/')
def index():
    """ static files serve """
    return send_from_directory('dist', 'index.html')


@app.route('/<path:path>')
def static_proxy(path):
    """ static folder serve """
    file_name = path.split('/')[-1]
    dir_name = os.path.join('dist', '/'.join(path.split('/')[:-1]))
    return send_from_directory(dir_name, file_name)


if __name__ == '__main__':
    LOG.info('running environment: %s', os.environ.get('ENV'))
    app.config['DEBUG'] = os.environ.get(
        'ENV') == 'development'  # Debug mode if development env
    app.run(host='0.0.0.0', port=int(PORT))  # Run the app
コード例 #48
0
ファイル: run.py プロジェクト: TayJacon/projeto-luiz
# -*- coding: utf-8 -*-
from app import app

if __name__ == '__main__':
    app.run(debug=True, use_reloader=True)
コード例 #49
0
ファイル: main.py プロジェクト: yeferson321/Back-evenhome
from app import app

PORT = 5000
DEBUG = True

if __name__ == '__main__':
    app.secret_key = "^A%DJAJU^JJ123"
    app.run(port=PORT, debug=DEBUG)
コード例 #50
0
import logging
import os
from app import app

# os.system("killall -9 gunicorn")
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
app = app

if __name__ == '__main__':
    ## production
    # current_dir_path = os.path.abspath(os.path.dirname(__file__))
    # os.system(f"cd {current_dir_path} && gunicorn -b 127.0.0.1:5000 --worker-class eventlet -w 1 run:app")

    ## development  --> 你应该在此模式下卸载eventlet包
    app.run(host='0.0.0.0')
    # 生产环s境可以注释
    # webbrowser.open("http://127.0.0.1:5000/login")
コード例 #51
0
###


@app.route('/<file_name>.txt')
def send_text_file(file_name):
    """Send your static text file."""
    file_dot_text = file_name + '.txt'
    return app.send_static_file(file_dot_text)


@app.after_request
def add_header(response):
    """
    Add headers to both force latest IE rendering engine or Chrome Frame,
    and also tell the browser not to cache the rendered page. If we wanted
    to we could change max-age to 600 seconds which would be 10 minutes.
    """
    response.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'
    response.headers['Cache-Control'] = 'public, max-age=0'
    return response


@app.errorhandler(404)
def page_not_found(error):
    """Custom 404 page."""
    return render_template('404.html'), 404


if __name__ == '__main__':
    app.run(debug=True, host="0.0.0.0", port="8080")
コード例 #52
0
ファイル: wsgi.py プロジェクト: NeilJain56/NandNPythonserver
        dec_c = chr((256 + ord(enc[i]) - ord(key_c)) % 256)
        dec.append(dec_c)
    return "".join(dec)


@app.route('/encrypt3')
@cross_origin(origin='localhost', headers=['Content- Type', 'Authorization'])
def encrypt3():
    baseString = request.args.get(
        'str')  # is no data sent this will return null

    final = personalEncryption(baseString)
    print('string received is ', baseString)
    return final


@app.route('/decrypt3')
@cross_origin(origin='localhost', headers=['Content- Type', 'Authorization'])
def decrypt3():
    baseString = request.args.get(
        'str')  # is no data sent this will return null

    final = personalDecryption(baseString)
    print('string received is ', baseString)
    return final


if __name__ == '__main__':
    # run!
    app.run()
コード例 #53
0
#! /usr/bin/env python
from app import app
app.run(debug=True, host="0.0.0.0", port=8090)
コード例 #54
0
ファイル: run.py プロジェクト: muchris26/wwpoints
#!flask/bin/python
import os
from app import app
port = int(os.environ.get("PORT", 33507))
app.run(host='0.0.0.0', port=port, debug=True)
コード例 #55
0
ファイル: uwsgi.py プロジェクト: cladup/objection
from app import app as application


if __name__ == '__main__':
    application.run()

コード例 #56
0
ファイル: skel.py プロジェクト: qetuop/flaskAlcWtfSkeleton
from app import app


if __name__ == "__main__":
    
    app.run(debug=True, host='0.0.0.0',port=5000)
コード例 #57
0
ファイル: run.py プロジェクト: cash2one/apc
# -*- coding: utf-8 -*-

from app import app


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
コード例 #58
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = 'BuGoNee'
'''
Some Explaination should be in here.
'''

from app import app
app.run(debug=True, host='0.0.0.0')
if __name__ == '__main__':
    pass
コード例 #59
0
from app import app

app.run(debug=True, port=80)
コード例 #60
0
from app import app, views

if __name__ == '__main__':
    app.run(host='127.0.0.1', port=5000, debug=True)