Files
website/website/run.py
2025-04-27 06:49:59 +02:00

24 lines
758 B
Python
Executable File

#!/usr/bin/env python3
import os
import sys
from pathlib import Path
from init_db import init_database
from app import app
if __name__ == "__main__":
# Check if CSS file exists, build it if it doesn't
css_file = Path(__file__).parent / "static" / "css" / "main.css"
if not css_file.exists():
print("CSS file not found. Building with Tailwind...")
try:
from build_css import build_css
build_css()
except Exception as e:
print(f"Warning: Failed to build CSS: {e}")
print("You may need to run 'python build_css.py' manually.")
# Initialize the database first
init_database()
# Run the Flask application
app.run(debug=True, host='0.0.0.0', port=5000)