diff options
author | Jesús <heckyel@hyperbola.info> | 2022-03-22 00:39:40 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-03-22 00:39:40 +0800 |
commit | 3fca03988b42adaf8e67cc7137dd1fdba327e197 (patch) | |
tree | ad39a5bc12a03c82b9a4fd980c1b92ca0a1dac93 /main.py | |
download | heroeapi-3fca03988b42adaf8e67cc7137dd1fdba327e197.tar.lz heroeapi-3fca03988b42adaf8e67cc7137dd1fdba327e197.tar.xz heroeapi-3fca03988b42adaf8e67cc7137dd1fdba327e197.zip |
initial commit
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +""" +Provides heroes API +""" +from flask import Flask +from flask_jwt_extended import JWTManager +from config import settings +from database.db import initialize_db +from routes.heroes import heroes +from routes.users import users +from routes.auth import auth + + +app = Flask(__name__) +app.config.from_object(settings['development']) +app.register_blueprint(heroes, url_prefix="/api/v1/") +app.register_blueprint(users, url_prefix="/api/v1/") +app.register_blueprint(auth, url_prefix="/api/v1/") +initialize_db(app) + +jwt = JWTManager(app) + + +if __name__ == '__main__': + app.run() |