Ejemplo n.º 1
0
#!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: run_service_api.py
@time: 2018-05-30 20:04
"""

from web_api import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)
Ejemplo n.º 2
0
from web_api import app

if __name__ == "__main__":
    app.run()
def runserver():
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)
Ejemplo n.º 4
0
def start_app():
    host = os.environ.get('IP', '127.0.0.1')
    port = int(os.environ.get('PORT', 8080))
    app.run(host=host, port=port)
Ejemplo n.º 5
0
"""
@author: qiyubing
@file: main.py
@time: 2020/03/23
@description: 主程序
"""
import logging
from web_api import app
from common.http import JSONEncoder

app.json_encoder = JSONEncoder
logging.basicConfig(level=logging.INFO)

if __name__ == '__main__':
    app.run("localhost", 8765)
Ejemplo n.º 6
0
 def api():
     """
     提供web接口的进程
     :return:
     """
     app.run('0.0.0.0', settings.API_WEB_PORT)