File size: 941 Bytes
9f76c25
 
8932ce6
 
 
 
 
9f76c25
 
 
8932ce6
 
 
9f76c25
 
 
 
 
 
 
 
 
 
 
 
1455a00
 
9f76c25
 
dec9b6b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from flask import Flask, render_template, send_from_directory, jsonify
import os
import logging

# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

app = Flask(__name__)

# Log startup
logger.info("Starting Growth Loop Simulator application...")

@app.route('/')
def index():
    try:
        return render_template('index.html')
    except Exception as e:
        app.logger.error(f"Error rendering index: {e}")
        return f"Internal Server Error: {e}", 500

@app.route('/health')
def health():
    return jsonify({"status": "healthy"}), 200

# Removed manual static route to rely on Flask's native static file handling
# ensuring standard behavior and reducing potential path resolution bugs.

if __name__ == '__main__':
    # Log that we are using the __main__ entry point
    logger.info("Starting via python app.py on port 7860...")
    app.run(host='0.0.0.0', port=7860, debug=False)