Пример #1
0
from hello import app as application

if __name__ == '__main__':
    application.run(host='0.0.0.0', debug=True)
Пример #2
0
# -*- coding: utf-8 -*-
from hello import app

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=5000)
Пример #3
0
#-*- coding:utf-8 -*-

from hello import app

if __name__ == "__main__":
    app.run(port=1234, debug=True)
Пример #4
0
from gevent import monkey

monkey.patch_all()

import os

virtenv = os.environ["OPENSHIFT_PYTHON_DIR"] + "/virtenv/"
virtualenv = os.path.join(virtenv, "bin/activate_this.py")
try:
    # See: http://stackoverflow.com/questions/23418735/using-python-3-3-in-openshifts-book-example?noredirect=1#comment35908657_23418735
    # execfile(virtualenv, dict(__file__=virtualenv)) # for Python v2.7
    # exec(compile(open(virtualenv, 'rb').read(), virtualenv, 'exec'), dict(__file__=virtualenv)) # for Python v3.3
    # Multi-Line for Python v3.3:
    exec_namespace = dict(__file__=virtualenv)
    with open(virtualenv, "rb") as exec_file:
        file_contents = exec_file.read()
    compiled_code = compile(file_contents, virtualenv, "exec")
    exec(compiled_code, exec_namespace)
except IOError:
    pass

from gevent.wsgi import WSGIServer

from hello import app

ip = os.environ["OPENSHIFT_PYTHON_IP"]
port = int(os.environ["OPENSHIFT_PYTHON_PORT"])

app.run(host=ip, port=port, server="gevent")
Пример #5
0
#! /usr/bin/env python
# -*- coding: utf8 -*-
from hello import app as application

if __name__ == "__main__":
    application.run()
Пример #6
0
from hello import app

if __name__ == "__main__":
    app.run(host="0.0.0.0")
Пример #7
0
from hello import app as application

if __name__ == "__main__":
    application.run()
Пример #8
0
from hello import app, db

if __name__ == '__main__':
    db.create_all()
    app.run(debug=True)
Пример #9
0
from hello import app
if __name__ == '__main__':
    app.run(debug=True, host='127.0.0.1', port=2000)
Пример #10
0
from hello import app
import os
if __name__ == '__main__':
    app.run(debug=True, port=8080, host=os.environ["IP"])
Пример #11
0
import sys

sys.path.append("/usr/local/lib/python2.7/site-packages/")

from hello import app

if __name__ == "__main__":
    listen_on = "8080"
    app.run(port=listen_on)
Пример #12
0
from hello import app

if __name__ == '__main__':
    app.run('0.0.0.0', port=8080)
Пример #13
0
def run():
    app.run()
Пример #14
0
from hello import app, db

if __name__ == '__main__':
    db.create_all()
    #app.run(debug=True)
    app.run(host='0.0.0.0', port=8080)
Пример #15
0
#!/usr/bin/python3
# -*- coding: utf-8; mode: python -*-

from hello import app

app.run(host="0.0.0.0", port=8181, debug=True)
Пример #16
0
from hello import app, db

if __name__ == '__main__':
    db.create_all()
    app.run(host='0.0.0.0')
Пример #17
0
from os import environ

from hello import app

app.run(port=environ.get('PORT', 5000))
Пример #18
0
from hello import app

if __name__ == "__main__":
        app.run()
Пример #19
0
def run():
    print('服务器跑起来了')
    app.run(debug=True)
Пример #20
0
from hello import app, db, views, models


# 서버 실행
if __name__ == '__main__':    
    app.run()
    
Пример #21
0
from hello import app as application

if __name__ == "__main__":
    application.run(host="0.0.0.0")