"""
Lab 14.4 slim target: same minimal Flask app, used as the AFTER image.
Identical logic to fat-app/app.py; the difference is the Dockerfile.
"""

from flask import Flask, request, jsonify

app = Flask(__name__)


@app.route("/health")
def health():
    return jsonify({"status": "ok"})


@app.route("/hello")
def hello():
    name = request.args.get("name", "world")
    return jsonify({"message": f"Hello, {name}"})


if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5000, debug=False)
