You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
567 B
Python
25 lines
567 B
Python
1 year ago
|
import os
|
||
|
from flask import Flask, render_template
|
||
|
from prefix import PrefixMiddleware
|
||
|
from flat import parse
|
||
|
from dotenv import load_dotenv
|
||
|
|
||
|
load_dotenv()
|
||
|
prefix = os.environ.get("URL_PREFIX", '')
|
||
|
port = os.environ.get("PORT", 3000)
|
||
|
debug = os.environ.get("DEBUG", True)
|
||
|
fireplace = os.environ.get("FIREPLACE", 'list.1dl')
|
||
|
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
app.wsgi_app = PrefixMiddleware(app.wsgi_app, prefix=prefix)
|
||
|
|
||
|
|
||
|
@app.route('/')
|
||
|
def bonfire():
|
||
|
content = parse(fireplace)
|
||
|
return render_template('bonfire.html', content=content)
|
||
|
|
||
|
|
||
|
app.run(port=port, debug=debug)
|