master
km0 2 years ago
parent 802ef4472b
commit 5ac7b1bcb1

1
.gitignore vendored

@ -1,3 +1,4 @@
venv/
.DS_Store
__pycache__
.env

@ -1,9 +1,16 @@
from flask import Flask, render_template, send_from_directory
from markdown import markdown
from prefix import PrefixMiddleware
from dotenv import load_dotenv
import os
load_dotenv()
prefix = os.environ.get('URL_PREFIX', '')
port = os.environ.get('PORT', '3000')
debug = os.environ.get('DEBUG', 'False')
app = Flask(__name__)
app.wsgi_app = PrefixMiddleware(app.wsgi_app, prefix='/soupboat/wlist')
app.wsgi_app = PrefixMiddleware(app.wsgi_app, prefix=prefix)
@app.route('/')
@ -17,4 +24,4 @@ def list():
def send_img(file):
return send_from_directory(app.root_path + '/img/', file, conditional=True)
app.run(port="3148", debug=True)
app.run(port=port, debug=debug)

@ -1,8 +1,10 @@
click==8.1.3
colorama==0.4.6
Flask==2.2.2
importlib-metadata==5.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
Markdown==3.4.1
MarkupSafe==2.1.1
python-dotenv==0.21.0
Werkzeug==2.2.2
zipp==3.10.0

Loading…
Cancel
Save