slinky/main.py

25 lines
497 B
Python

"""
Main Flask-based app for Slinky
"""
from flask import Flask, Response, render_template
from werkzeug.middleware.proxy_fix import ProxyFix
from slinky.web import protect, slinky_webapp
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1)
app.register_blueprint(slinky_webapp)
@app.route("/")
@protect
def index() -> Response:
"""
Index/Landing page
Returns:
str: string of page content
"""
return Response(render_template("index.html"), 200)