#!/usr/bin/env python3
"""Startup script for the Wix Form Handler API
"""

import os

import uvicorn

if __name__ == "__main__":
    db_path = "alpinebits.db"  # Adjust path if needed
    if os.path.exists(db_path):
        os.remove(db_path)
        print(f"Deleted database file: {db_path}")

    uvicorn.run(
        "alpine_bits_python.api:app",
        host="0.0.0.0",
        port=8080,
        reload=True,  # Enable auto-reload during development
        log_level="info",
    )
