Files
gesthub/flask-app/app.py
k6Wz7SqNXTDm@tpaDX2% 094eeb7699 add base
2025-04-08 12:19:56 +02:00

17 lines
403 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# flask-app/app.py
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://flaskuser:flaskpass@mariadb/flaskdb'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
@app.route('/')
def index():
return 'Bienvenue sur lintranet !'
if __name__ == '__main__':
app.run(host='0.0.0.0')