Example #1
0
def run_test_server():
    """Used by the phantomjs tests to run a live testing server"""
    # running the server in debug mode during testing fails for some reason
    app.config['DEBUG'] = False
    app.config['TESTING'] = True
    port = app.config['TESTSERVER_PORT']
    # Don't use the production database but a temporary test database.
    app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///test.db"
    db.drop_all()
    db.create_all()
    db.session.commit()

    # Add a route that allows the test code to shutdown the server, this allows
    # us to quit the server without killing the process thus enabling coverage
    # to work.
    app.add_url_rule('/shutdown', 'shutdown', shutdown,
                             methods=['POST', 'GET'])
    main.use_log_file_handler()

    app.run(port=port, use_reloader=False, threaded=True)

    db.session.remove()
    db.drop_all()
Example #2
0
from app.main import app

app.run(host="0.0.0.0", port=5000)
Example #3
0
from app.main import app

if __name__ == "__main__":
    # app.run(debug=True)
    app.run(host='0.0.0.0', debug=True, port=3030)
Example #4
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# from app import app
#
# app.run(debug=True)

from app.main import app

# app = create_app()
app.run(debug=False, host="127.0.0.1", port=5000)
# app.run(debug=False)
Example #5
0
from app.main import app

if __name__ == "__main__":
    app.run(  # Starts the site
        host=
        '0.0.0.0',  # EStablishes the host, required for repl to detect the site
        port=5000,  # Randomly select the port the machine hosts on.
        threaded=False)
Example #6
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    run_c9.py - запуск проекта в среде c9io
    ситемные переменные:
        IP      - ip("0.0.0.0")
        PORT    - port("8080")
        
    при запуске реальный хост - http://python-apps-diver.c9users.io/ или http://python-apps-diver.c9users.io:8080
"""
import os
from app.main import app



# use os.getenv(PORT, 8080) as the port and os.getenv(IP, 0.0.0.0) as the host in your scripts!

host = os.getenv("IP", "0.0.0.0")
port = int(os.getenv("PORT", 8080))


# app = create_app()
help_host_text = "http://python-apps-diver.c9users.io/"
print("starting app on: {}:{}".format(host, port))
print("starting app on: {}".format(help_host_text))
app.run(debug=True, host=host, port=port)

# app.run(debug=False)
Example #7
0
from app.main import app

app.run(host='0.0.0.0', debug=False) # host='0.0.0.0', port=8080, 
from app.main import app

import os
import errno

if __name__ == "__main__":
    UPLOAD_FOLDER = './app/static'
    DATA_URL = './app/static/data.csv'

    app.secret_key = "secret key"
    app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
    app.config["DATA_URL"] = DATA_URL
    try:
        os.makedirs(UPLOAD_FOLDER)
    except OSError as e:
        if e.errno != errno.EEXIST:
            raise
    app.config['MAX_CONTENT_LENGTH'] = 100 * 1024 * 1024 * 1024
    app.run(host='0.0.0.0', port=5001, debug=True, threaded=True)
Example #9
0
#!/opt/python27/bin python
from app.main import app
from werkzeug.contrib.fixers import ProxyFix

app.wsgi_app = ProxyFix(app.wsgi_app)
if __name__ == '__main__':
    app.run("0.0.0.0")
Example #10
0
if __name__ == "__main__":
    from app.main import app
    app.run()
Example #11
0
import sys
sys.path.append('/var/www/apigithubalfa')
from app.main import app as application

application.run(debug=True)
Example #12
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# from app import app
#
# app.run(debug=True)



from app.main import app

# app = create_app()
app.run(debug=False, host="127.0.0.1", port=5000)
# app.run(debug=False)
Example #13
0
#! /usr/bin/env python

from app.main import app as prog

prog.run(debug=True,host='0.0.0.0',port=8080)
Example #14
0
@authors:
    Andrei Sura             <*****@*****.**>
    Ruchi Vivek Desai       <*****@*****.**>
    Sanath Pasumarthy       <*****@*****.**>
    Nicholas Rejack         <*****@*****.**>
"""

import argparse
from app.main import app, mail
from app import initializer
from config import MODE_DEBUG

# Configures routes, models
app = initializer.do_init(app, mode=MODE_DEBUG)
mail.init_app(app)


if __name__ == "__main__":
    """ Entry point for command line execution """
    parser = argparse.ArgumentParser()
    parser.add_argument('--port',
                        dest='port',
                        type=int,
                        default=5000,
                        help="Application port number")
    args = parser.parse_args()
    ssl_context = initializer.get_ssl_context(app)
    print("curl -skL https://localhost:{}".format(args.port))
    app.run(host='0.0.0.0', port=args.port, ssl_context=ssl_context)
Example #15
0
from app.main import app

if __name__ == "__main__":

    app.run(port=8000, debug=True)
Example #16
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# from app import app
#
# app.run(debug=True)



from app.main import app

# app = create_app()
app.run(debug=True, host="127.0.0.1", port=5000)
# app.run(debug=False)
Example #17
0
# -*- coding: utf-8 -*-

from app.main import app
import webbrowser

if __name__ == "__main__":
    app.run("localhost", port=5000, debug=True)  # 테스트할때는 이것으로 쓰세요
    #app.run() #ngrok 쓸 때는 이거로 쓰세요
    webbrowser.open("http://localhost:5000", 2)
Example #18
0
def run():
    app.secret_key = SECRET_KEY
    app.run()
Example #19
0
from app.main import app

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=5000, debug=True)
    # debug = True
def run_coreserver():
    core_app.run(debug=True, port=5000)
Example #21
0
from app.main import app
import firebase_admin
from firebase_admin import credentials
import os
import json

# Initialize Firebase Admin App
cred = credentials.Certificate({**json.loads(os.environ['FIREBASE_CRED'])})

firebase_admin.initialize_app(cred, {
    'storageBucket': 'web-eye-tracker-front.appspot.com'
})

if __name__ == "__main__":
    app.run(debug=os.environ['FLASK_ENV'])
Example #22
0
from app.main import app 

if __name__ == '__main__':
    print("Starting python app")
    app.run(host='0.0.0.0',port=8080,processes=2,threaded=False)
Example #23
0
from app.main import app

if __name__ == "__main__":
  app.run(host="127.0.0.1", port=5000, debug=True) 
Example #24
0
from app.main import app
from app import db

if __name__ == "__main__":
    with app.app_context():
        db.create_all()
        app.run(debug=True)
Example #25
0
from app.main import app
if __name__ == "__main__":
    app.run(host='0.0.0.0')
Example #26
0
Goal: Implement the application entry point

@authors:
    Andrei Sura             <*****@*****.**>
    Ruchi Vivek Desai       <*****@*****.**>
    Sanath Pasumarthy       <*****@*****.**>
    Nicholas Rejack         <*****@*****.**>
"""

import argparse
from app.main import app, mail
from app import initializer
from config import MODE_DEBUG

# Configures routes, models
app = initializer.do_init(app, mode=MODE_DEBUG)
mail.init_app(app)

if __name__ == "__main__":
    """ Entry point for command line execution """
    parser = argparse.ArgumentParser()
    parser.add_argument('--port',
                        dest='port',
                        type=int,
                        default=5000,
                        help="Application port number")
    args = parser.parse_args()
    ssl_context = initializer.get_ssl_context(app)
    print("curl -skL https://localhost:{}".format(args.port))
    app.run(host='0.0.0.0', port=args.port, ssl_context=ssl_context)
Example #27
0
from app.main import app

if __name__ == "__main__":
    app.run(threaded=True)
Example #28
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    run_c9.py - запуск проекта в среде c9io
    ситемные переменные:
        IP      - ip("0.0.0.0")
        PORT    - port("8080")
        
    при запуске реальный хост - http://python-apps-diver.c9users.io/ или http://python-apps-diver.c9users.io:8080
"""
import os
from app.main import app

# use os.getenv(PORT, 8080) as the port and os.getenv(IP, 0.0.0.0) as the host in your scripts!

host = os.getenv("IP", "0.0.0.0")
port = int(os.getenv("PORT", 8080))

# app = create_app()
help_host_text = "http://python-apps-diver.c9users.io/"
print("starting app on: {}:{}".format(host, port))
print("starting app on: {}".format(help_host_text))
app.run(debug=True, host=host, port=port)

# app.run(debug=False)
Example #29
0
__author__ = 'vcaen'
from app.main import app

if __name__ == '__main__':
    app.run(host="0.0.0.0", debug=True)

Example #30
0
from app.main import app

if __name__ == '__main__':
    app.run(port=5000)
Example #31
0
import os
from app.main import app

if __name__ == "__main__":
    port = int(os.environ.get("PORT", 5000))
    app.run(host="0.0.0.0", port=port)
Example #32
0
from app.main import app

if __name__ == "__main__":
    # app.run()
    app.run(host="0.0.0.0", port=80)
Example #33
0
def run():
    """Main entry
    """
    app.run(host='0.0.0.0')
Example #34
0
from app.main import app

if __name__ == '__main__':
    app.run(host='127.0.0.1', port=5500, debug=True)
import os
import sys

from app import conf
from app.main import app


sys.path.append(os.path.dirname(__file__))

if __name__ == '__main__':
    print('Running server on http://%s:%d' % (conf.HOST, conf.PORT))
    app.run(debug=conf.DEBUG, host=conf.HOST, port=conf.PORT)
Example #36
0
#!/usr/bin/env python

from app.main import app

if __name__ == '__main__':
    app.run(debug=True, host="127.0.0.1")
    #app.run(debug=True, host="ignalion.me")
Example #37
0
from app.main import app
app.debug =True
app.run('0.0.0.0', 8000)
Example #38
0
# Runs flask api
from app.main import app
if __name__ == "__main__":
    # app.run()
    app.run(host='localhost', port=9874)
Example #39
0
from app.main import app

app.run(host='0.0.0.0', port=7273)
Example #40
0
from app.main import app
app.run(host='0.0.0.0', port=8080, debug=True)
Example #41
0
from app.main import app
if __name__ == '__main__':
    app.run(debug=True)
import os
import sys

from app import conf
from app.main import app

sys.path.append(os.path.dirname(__file__))

if __name__ == '__main__':
    print('Running server on http://%s:%d' % (conf.HOST, conf.PORT))
    app.run(debug=conf.DEBUG, host=conf.HOST, port=conf.PORT)
Example #43
0
# encoding=utf8
from app.main import app

import logging
from logging.handlers import WatchedFileHandler

import gevent.monkey

if __name__ == "__main__":
    gevent.monkey.patch_all()

    acclog = logging.getLogger('gunicorn.access')
    acclog.addHandler(WatchedFileHandler('/logs/pyservice_log/pyservice_access.log'))
    acclog.propagate = False
    errlog = logging.getLogger('gunicorn.error')
    errlog.addHandler(WatchedFileHandler('/logs/pyservice_log/pyservice_error.log'))
    errlog.propagate = False

    app.run()
Example #44
0
from app.main import app
import os

if __name__ == '__main__':
	app.run(host=os.getenv('IP','0.0.0.0'),port=int(os.getenv('PORT',5656)))