Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 554 Bytes
from config import TEMPLATES
import os
from flask import Flask, request, make_response, render_template
from jinja2.exceptions import TemplateNotFound
app = Flask(__name__)
app.config['DEBUG'] = bool(os.environ.get('DEBUG'))
@app.route('/', defaults={'path': ''})
def index(path):
if path in TEMPLATES:
return render_template(path + '/index.html', path=path)
return render_template("index.html")
if __name__ == "__main__":
port = int(os.environ.get("PORT", 5000))'', port=port)
Something went wrong with that request. Please try again.