2025-03-09 12:57:29 -05:00
|
|
|
from flask import *
|
|
|
|
from os import path, walk
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
2025-03-09 23:41:26 -05:00
|
|
|
|
2025-03-09 12:57:29 -05:00
|
|
|
@app.route('/')
|
|
|
|
def home():
|
|
|
|
return render_template('index.j2', instanceName="nyxask.nixos.internal")
|
|
|
|
|
2025-03-09 23:41:26 -05:00
|
|
|
|
2025-03-09 12:57:29 -05:00
|
|
|
@app.route('/auth/login/')
|
|
|
|
def login():
|
|
|
|
return render_template('login.j2', instanceName="nyxask.nixos.internal")
|
|
|
|
|
2025-03-09 23:41:26 -05:00
|
|
|
|
|
|
|
@app.route('/assets/css/index.css')
|
|
|
|
def index_css():
|
|
|
|
return send_from_directory('static/assets/css', 'index.css')
|
|
|
|
|
|
|
|
|
|
|
|
extra_dirs = ['app/templates', 'static/assets/css']
|
2025-03-09 12:57:29 -05:00
|
|
|
extra_files = extra_dirs[:]
|
|
|
|
for extra_dir in extra_dirs:
|
|
|
|
for dirname, dirs, files in walk(extra_dir):
|
|
|
|
for filename in files:
|
|
|
|
filename = path.join(dirname, filename)
|
|
|
|
if path.isfile(filename):
|
|
|
|
extra_files.append(filename)
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
app.run(debug=True, extra_files=extra_files)
|