-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc0c9cb
commit cf4a456
Showing
3 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
from flask import Flask, render_template, request, redirect, session, flash, jsonify, url_for | ||
from flask_session import Session # Import für die Session-Erweiterung | ||
|
||
app = Flask(__name__) | ||
|
||
# Konfigurationen für automatisches Template-Reload, Sessions und Datenbank | ||
app = Flask(__name__, template_folder='frontend') # Setze den template_folder auf den 'frontend' Ordner | ||
# Konfigurationen für automatisches Template-Reload, Sessions und Datenbank, falls wir eine brauchen | ||
app.config["TEMPLATES_AUTO_RELOAD"] = True | ||
# festgelegt, dass Session nicht dauerhaft ist | ||
app.config["SESSION_PERMANENT"] = False | ||
# Sitzungsinformationen auf dem Dateisystem gespeichert | ||
app.config["SESSION_TYPE"] = "filesystem" | ||
# Geheimer Schlüssel für die Session-Sicherheit (notwendig für die Session-Verwaltung) | ||
Session(app) # Initialisiert die Session mit der App | ||
|
||
@app.route('/') | ||
def home(): | ||
return "Legal Prompt" | ||
|
||
return render_template('index.html') | ||
if __name__ == "__main__": | ||
app.run(debug=True, port=5001) # Startet den Server auf Port 5001 mit aktiviertem Debug-Modus | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters