This repository has been archived on 2025-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pypages/app.py
2025-11-16 18:01:30 +01:00

24 lines
615 B
Python

"""
Main Flask application entry point.
"""
import os
from flask import Flask, send_from_directory
from routes.api import api_bp
# Get the directory where this script is located
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__, static_folder='static', static_url_path='/static')
# Register API blueprint (FastAPI-compatible route structure)
app.register_blueprint(api_bp)
# Serve index.html at root
@app.route('/')
def index():
return send_from_directory(os.path.join(basedir, 'static'), 'index.html')
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=5000)