H4CK3R-01 6923095939 Many api changes
- Added basic jwt auth
- Added keyword endpoints
- added share/symbol endpoints
- updated postman
- refactoring
2022-03-14 17:10:00 +01:00

41 lines
958 B
Python

from flask import Flask
from dotenv import load_dotenv
from webservice.models import *
from webservice.interface import interface
from webservice.blueprints.keyword import keyword_blueprint
from webservice.blueprints.shares import shares_blueprint
from webservice.blueprints.user import users_blueprint
def create_app():
load_dotenv()
# Create Flask app load app.config
application = Flask(__name__)
application.config.from_object("config.ConfigClass")
application.app_context().push()
db.init_app(application)
# Create all tables
db.create_all()
# api blueprints
application.register_blueprint(keyword_blueprint)
application.register_blueprint(shares_blueprint)
application.register_blueprint(users_blueprint)
# interface blueprint
application.register_blueprint(interface)
return application
app = create_app()
# Start development web server
if __name__ == '__main__':
app.run()