-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
32 lines (23 loc) · 806 Bytes
/
run.py
File metadata and controls
32 lines (23 loc) · 806 Bytes
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
from flask import Flask
from flask_jwt_extended import JWTManager
from Extras.db import db
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['JWT_SECRET_KEY'] = 'none'
jwtManager = JWTManager(app=app)
from Routes.user_routes import user_bp
from Routes.stock_routes import stock_bp
from Routes.watchlist_routes import watchlist_bp
from Routes.simulator_routes import simulator_bp
app.register_blueprint(user_bp)
app.register_blueprint(stock_bp)
app.register_blueprint(watchlist_bp)
app.register_blueprint(simulator_bp)
db.init_app(app)
from flask_cors import CORS
CORS(app)
with app.app_context():
db.create_all()
if __name__ == '__main__':
app.run(host="0.0.0.0", port=5000, debug=True)