# 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()
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
def api(self): app.run(API_HOST, API_PORT)
from flask_api import app app.run(debug=True, host='localhost', port='5501') print("app is running")
from flask_api import app if __name__ == "__main__": app.run()
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()
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)
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
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
def api(): print("API接口开始运行") app.run(host=API_ADDRESS,port=API_PORT)
__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)