Esempio n. 1
0
# TODO move to main game loop
from multiprocessing import Process
import pygame
import sys

from board import Board
from view import View
from flask_api import app
try:
    app.view = View()  #type : View
    app.board = Board()  #type : Board
    app.view.draw_board(app.board.get_board())
    app.run(host='0.0.0.0', port=5000, debug=False)
except:
    pygame.quit()
Esempio n. 2
0
from flask_api import app

# import for faker file for seed data
from faker_seed_db import seedData

if __name__ == '__main__':
    app.run(debug=True)
    # seedData()
    # uncomment if you want to add more patient data to your database
Esempio n. 3
0
 def api(self):
     app.run(API_HOST, API_PORT)
Esempio n. 4
0
from flask_api import app
app.run(debug=True, host='localhost', port='5501')
print("app is running")
Esempio n. 5
0
from flask_api import app

if __name__ == "__main__":
    app.run()
Esempio n. 6
0
def profile(length=25):
    """Start the application under the code profiler."""
    from werkzeug.contrib.profiler import ProfilerMiddleware
    app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[length])
    app.run()
Esempio n. 7
0
import os
from flask_api import app
from flask_api.product import views

if __name__ == '__main__':
    port = int(os.environ.get('PORT', 5000))
    app.run(host='0.0.0.0', port=port)




Esempio n. 8
0
from flask_api import app, db
from flask_api.models import users, apikeys

db.create_all() # makes sure all tables exist

if __name__ == '__main__':
    # use port=80 to remove port requirement in url
	app.run(port=5000, debug=False) # 5000 is default for flask
Esempio n. 9
0
import os
from flask_api import app, db
from flask_api.models import users, apikeys

db.create_all()  # makes sure all tables exist

if __name__ == '__main__':
    # use port=80 to remove port requirement in url
    port = int(os.environ.get('PORT'))
    app.run(host='0.0.0.0', port=port,
            debug=False)  # 5000 is default for flask
Esempio n. 10
0
 def api():
     print("API接口开始运行")
     app.run(host=API_ADDRESS,port=API_PORT)
Esempio n. 11
0
__author__ = 'some_guy'
import os
import sys
# make python to know what the starting point of this whole thing
# and be able to find stuff within the app.
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from flask_api import app


if __name__ == '__main__':
    app.run(port=3001, debug=True)