feat: RFCP MVP deployed on VPS
Iteration 1: - Dark theme with 3-way toggle - Dynamic heatmap gradient (blue→red) - Radius up to 100km - Save & Calculate workflow Iteration 2: - Terrain overlay toggle - Batch height operations - Zoom-dependent heatmap rendering Infrastructure: - Backend FastAPI on 8888 - Frontend static build via Caddy - Systemd services - Caddy reverse proxy integration
This commit is contained in:
0
backend/app/__init__.py
Normal file
0
backend/app/__init__.py
Normal file
BIN
backend/app/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
backend/app/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
backend/app/__pycache__/main.cpython-312.pyc
Normal file
BIN
backend/app/__pycache__/main.cpython-312.pyc
Normal file
Binary file not shown.
29
backend/app/main.py
Normal file
29
backend/app/main.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.responses import FileResponse
|
||||
import os
|
||||
|
||||
app = FastAPI(title="RFCP API")
|
||||
|
||||
# CORS
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["https://rfcp.eliah.one", "http://localhost:5173"],
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
@app.get("/health")
|
||||
async def health():
|
||||
return {"status": "healthy", "version": "1.0.0"}
|
||||
|
||||
@app.get("/api/terrain/{region}")
|
||||
async def get_terrain(region: str):
|
||||
terrain_path = f"/opt/rfcp/data/terrain/{region}.hgt"
|
||||
if os.path.exists(terrain_path):
|
||||
return FileResponse(terrain_path)
|
||||
return {"error": "Region not found"}, 404
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
uvicorn.run(app, host="0.0.0.0", port=8090)
|
||||
Reference in New Issue
Block a user