You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
552 B
20 lines
552 B
from sys import prefix
|
|
from flask import Flask
|
|
from db.model import db
|
|
from config import *
|
|
from blueprints.profile import profile as profileBlueprint
|
|
app = Flask(__name__)
|
|
app.config["SQLALCHEMY_DATABASE_URI"] = DB_URI
|
|
db.init_app(app)
|
|
|
|
app.register_blueprint(profileBlueprint, url_prefix='/api')
|
|
|
|
|
|
@app.route('/', methods=['GET', 'POST'])
|
|
def homepage():
|
|
return {'message': 'Welcome back !'}, 200
|
|
|
|
if __name__ == '__main__':
|
|
with app.app_context():
|
|
db.create_all()
|
|
app.run(host='0.0.0.0', port=9999, debug=True) |