forked from diverso-lab/splc23-analysis-operations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
31 lines (25 loc) · 728 Bytes
/
app.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
from flask import Flask, jsonify
from flask_swagger_ui import get_swaggerui_blueprint
# Importing routes
from routes.recommender_routes import recommender_bp
# Creating the app and configuring it
app = Flask(__name__)
app.config['API_BASE_URL'] = '/api/v1'
# Swagger UI
SWAGGER_URL = '/docs'
API_URL = '/static/swagger.yml'
SWAGGERUI_BLUEPRINT = get_swaggerui_blueprint(
SWAGGER_URL,
API_URL,
config={
'app_name': "FLAMAPY API - V1"
}
)
# Adding blueprints
app.register_blueprint(SWAGGERUI_BLUEPRINT, url_prefix=SWAGGER_URL)
app.register_blueprint(recommender_bp)
@app.route("/", methods=['GET'])
def home():
return app.send_static_file('results.html')
if __name__ == '__main__':
app.run()