mirror of
https://github.com/Jeuners/agenttwo-tools.git
synced 2026-09-09 15:02:31 +02:00
feat: Frontend im Produktionsbetrieb ausliefern, TTFT bei OpenRouter
npm start baute web/dist, aber niemand lieferte es aus — der Server stellte nur die API bereit. Jetzt registriert er @fastify/static, wenn ein Build vorliegt, und die App läuft komplett unter :8788. Ohne web/dist bleibt alles wie bisher (Vite übernimmt im Dev-Betrieb); der Start sagt, welcher Fall vorliegt. /api und /ws behalten Vorrang, unbekannte /api-Pfade antworten weiterhin mit JSON statt mit index.html. OpenRouter, beim Verifizieren gegen ein Gratis-Modell gefunden: - ttftMs wurde nie gesetzt — evalMs wurde aus firstTokenAt gerechnet, das Feld selbst blieb null - die Zeitmessung startete erst nach dem fetch und ließ damit die Wartezeit auf den Anbieter aus. Startet jetzt davor, wie bei Ollama Geprüft im Produktionsmodus: /, /assets/*.js, SPA-Fallback, JSON-404 auf /api, WebSocket aus Origin :8788 und :5174 verbunden, fremde Origin 403. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AUP4R3rgq4XwVs4bVf7uh
This commit is contained in:
parent
ed3c01303b
commit
da1d8be426
5 changed files with 309 additions and 9 deletions
|
|
@ -11,6 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@fastify/cors": "^10.0.1",
|
||||
"@fastify/static": "^10.1.3",
|
||||
"defuddle": "^0.19.3",
|
||||
"fastify": "^5.2.1",
|
||||
"linkedom": "^0.18.13",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue