-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
44 lines (29 loc) · 834 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# from flask import Flask
# from flask import render_template
# app = Flask(__name__)
# @app.route('/')
# def home():
# return render_template('home.html')
# if __name__ == '__main__':
# app.run(debug=True)
# from flask import Flask
# def create_app():
# app = Flask(__name__)
# # # Register Blueprints
# # from .app.views import main
# # app.register_blueprint(main)
# # with app.app_context():
# # # Create database tables based on models
# # db.create_all()
# return "Hello"
from app import create_app
import os
app = create_app()
if __name__ == '__main__':
# app.run(debug=True)
host = 'localhost' # Listen on all network interfaces
port = int(5000)
if os.name == "nt":
app.run(debug=True)
else:
app.run(host=host, port=port)