fix: remove backend placeholders

This commit is contained in:
2026-03-12 21:10:00 +01:00
parent 0578b26241
commit b71d32da5e
5 changed files with 4 additions and 100 deletions

View File

@@ -36,7 +36,7 @@ cd frontend && npm install && npm run dev
# → http://localhost:3000
```
**Frontend + backend** (so the app can show “Backend API: N todos”):
**Frontend + backend** (for AI agent and health):
```bash
# Terminal 1 backend
@@ -45,7 +45,7 @@ cd backend && npm install && npm run dev
# Terminal 2 frontend
cd frontend && npm install && npm run dev
# → http://localhost:3000 (Vite proxies /api/todos to backend)
# → http://localhost:3000 (Vite proxies /api/* and /health to backend)
```
---
@@ -89,16 +89,9 @@ For self-hosting (e.g. Tailscale/HTTPS): set `CORS_ORIGIN` to your frontend URL;
| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/todos` | List all todos. |
| GET | `/api/todos/:id` | Get one todo. |
| POST | `/api/todos` | Create (`{ "title": "...", "completed": false }`). |
| PUT | `/api/todos/:id` | Update. |
| DELETE | `/api/todos/:id` | Delete. |
| GET | `/health` | Health check (e.g. for Docker). |
| POST | `/api/agent` | Run AI agent; body `{ "prompt", "context?", "contextNodes?" }``{ "markdown" }`. |
Data is in-memory (resets on restart). Add a JSON file or DB later if needed.
---
## Agent node (local LLM or OpenAI)