Ejemplo n.º 1
0
import os

from server.app import app
import param

os.chdir(os.path.dirname(os.path.realpath(__file__)))

print("starting server on http://" + param.localServerName + ":" + str(param.localServerPort))

test = True

# fix bidon pour reload l'app à la modif sinon ça bug

if test:
    while True:
        try:
            app.run(host=param.localServerName, port=param.localServerPort, debug=True)
        except SystemExit:
            pass
else:
    app.run(host=param.localServerName, port=param.localServerPort, debug=True)

print("done")
Ejemplo n.º 2
0
from server.app import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=app.config['DEBUG'])
Ejemplo n.º 3
0
from server.app import app

if __name__ == '__main__':
    print("Running server")
    app.run(host='0.0.0.0', port="5000")
Ejemplo n.º 4
0
from set_env import setup_env

setup_env()
from server.app import app

if __name__ == "__main__":

    app.run(debug=True, port=5000)
Ejemplo n.º 5
0
#!/usr/bin/env python
from server.app import app

if __name__ == '__main__':
  app.run(port=6900, debug=True)
Ejemplo n.º 6
0
#!/usr/bin/env python
"""
Runs the backend server
"""

from flask import Flask
from server.app import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=app.config['PORT'])
Ejemplo n.º 7
0
from server.app import app
import ssl

if __name__ == "__main__":
  ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
  ssl_context.load_cert_chain(certfile="ssl/certificate.crt", keyfile='ssl/private.key')
  app.run(host="0.0.0.0", port=5000, threaded=True, debug=True, ssl_context=ssl_context)
Ejemplo n.º 8
0
# coding=utf-8
from flask.ext.jwt import JWT

from server import root_blueprint

from server.app import app
from server.bands import band_blueprint
from server.vote import vote_blueprint, track_blueprint

# this file is only for local testing
# in a productive environment this is
# i.e. ~/fcgi-bin/tunefish-beta
from server.vote.jwt import identity, authenticate, jwt_request_handler

jwt = JWT(app, authenticate, identity)
jwt.request_handler(jwt_request_handler)

app.register_blueprint(band_blueprint, url_prefix='/bands')
app.register_blueprint(vote_blueprint, url_prefix='/vote')
app.register_blueprint(track_blueprint, url_prefix='/vote')
app.register_blueprint(root_blueprint, url_prefix='')


if __name__ == '__main__':
    app.run(threaded=True, host='0.0.0.0')
Ejemplo n.º 9
0
#!/usr/bin/env python
from server.app import app

if __name__ == '__main__':
    app.run(port=6900, debug=True)
Ejemplo n.º 10
0
 def start(self):
     app.run(host=self.server_address, port=self.port)
Ejemplo n.º 11
0
from server.app import app

if __name__ == "__main__":

    app.run(
        host=app.config['HOST'],
        port=app.config['PORT'],
        debug=app.config['DEBUG_MODE'])
Ejemplo n.º 12
0
from server.app import app

if __name__ == "__main__":
  app.run(host="0.0.0.0", port=8080, threaded=True, debug=False)
Ejemplo n.º 13
0
import yaml

import sys
sys.path.append("src")

from server.app import app

if __name__ == "__main__":
    app.run(debug=True, host='0.0.0.0')
Ejemplo n.º 14
0
def main():
    app.run(debug=True)
Ejemplo n.º 15
0
from server.app import app

if __name__ == '__main__':
    app.run(debug=True)
Ejemplo n.º 16
0
# -*- coding: utf-8 -*-
# @Author: ioriiod0
# @Date:   2017-07-12 11:47:28
# @Last Modified by:   ioriiod0
# @Last Modified time: 2017-07-14 19:21:37
import sys
sys.path.append("..")

import gevent
from gevent.monkey import patch_all
from conf import *
'''
gevent是第三方库,通过greenlet实现协程,其基本思想是:
当一个greenlet遇到IO操作时,比如访问网络,就自动切换到其他的greenlet,等到IO操作完成,再在适当的时候切换回来继续执行。
由于IO操作非常耗时,经常使程序处于等待状态,有了gevent为我们自动切换协程,就保证总有greenlet在运行,而不是等待IO。
由于切换是在IO操作时自动完成,所以gevent需要修改Python自带的一些标准库,这一过程在启动时通过monkey patch完成:
'''
patch_all()
from server.app import app

if __name__ == '__main__':
    app.run(debug=True, host=http_host, port=http_port)
Ejemplo n.º 17
0
import os, sys
from server.app import app

if (sys.version_info[0] == 2):
    raise RuntimeError("python2 not supported")

port = 4200
if "PORT" in os.environ:
    port = int(os.environ["PORT"])

app.run(host='localhost', port=port)
Ejemplo n.º 18
0
from server.app import app
import config


if __name__ == "__main__":
    if config.DEV_MODE:
        app.run(debug=True)
    else:
        app.run(host="0.0.0.0", port=8080)
Ejemplo n.º 19
0
from server.app import app

if __name__ == '__main__':
    app.run(debug=app.config['DEBUG'], host='0.0.0.0', port=3001)
from server.app import app

if __name__ == '__main__':
    app.run(port=8000)
Ejemplo n.º 21
0
#!./__venv__/bin/python3.6

import logging

from server.app import app

logger = logging.getLogger(__name__)

if __name__ == "__main__":
    logger.info('Listening on http://0.0.0.0:%d', app.config['SERVER_PORT'])
    app.run(host='0.0.0.0', port=app.config['SERVER_PORT'])
Ejemplo n.º 22
0
from server.app import app, db
from server.models import *

if __name__ == '__main__':
    with app.app_context():
        db.create_all()
    # setting host to 0.0.0.0 to access the site on local ip addresses (ifconfig)
    app.run(host='0.0.0.0', port=8080, debug=True)
Ejemplo n.º 23
0
def runServer(port):
    serverApp.register_blueprint(placer_blueprint, url_prefix='/placer')
    serverApp.register_blueprint(authenticator_blueprint, url_prefix='/authenticator')
    serverApp.run(port=port)
Ejemplo n.º 24
0
#coding: utf-8

from server.app import app


if __name__ == '__main__':
    app.run(host='0.0.0.0')
Ejemplo n.º 25
0
from server.app import app

if __name__ == '__main__':
    app.run()
Ejemplo n.º 26
0
from server.app import app

if __name__ == "__main__":

    app.run(host=app.config['HOST'],
            port=app.config['PORT'],
            debug=app.config['DEBUG_MODE'])
Ejemplo n.º 27
0
import os
from server.app import app

if __name__ == "__main__":
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)
Ejemplo n.º 28
0
def main():
    app.run(debug=True, host='0.0.0.0', port=80)
Ejemplo n.º 29
0
from config.settings import SERVER_HOST, SERVER_PORT
from server.app import app

if __name__ == '__main__':
    app.run(SERVER_HOST, SERVER_PORT)
Ejemplo n.º 30
0
#!/usr/bin/python3
from server.app import app as application

if __name__ == "__main__":
    application.run(host='0.0.0.0')
Ejemplo n.º 31
0
import os

from server.app import app

app.yapapi_executor_config = {
    #   NOTE: budget == 10 is not enough to make it run for long
    'budget': 10,
    'subnet_tag': os.environ.get('SUBNET_TAG', 'erigon'),
}

if __name__ == '__main__':
    app.run(host='0.0.0.0')
Ejemplo n.º 32
0
from server.app import app
import os

if __name__ == "__main__":
    # Get Heroku port, fall back to port 5000
    port = int(os.environ.get("PORT", 5000))
    app.run(host="0.0.0.0", port=port)
Ejemplo n.º 33
0
def main():
    app.run(host='0.0.0.0', port=8080, debug=True)
Ejemplo n.º 34
0
from server.app import app
from server.config import config
from server.api import api

# Note, this file exists because I was having issues with module levels
# imports working in app.py for both flask and celery
api.init_app(app)

if __name__ == '__main__':
    if config["IN_DOCKER"]:
        print('Starting server with docker settings')
        app.run(port="5000", host="0.0.0.0")
    else:
        print(
            'Starting server with local execution settings, please be sure to use port 5005'
        )
        app.run(debug=True, port="5005")