Compare commits

..

2 Commits

Author SHA1 Message Date
6b839bcdff Actualizar README.md 2026-08-19 17:46:16 -03:00
498f91e020 Actualizar README.md 2026-08-19 17:45:59 -03:00
3 changed files with 24 additions and 1 deletions

View File

@ -80,4 +80,4 @@ El proyecto utiliza una arquitectura **Serverless BaaS (Backend-as-a-Service)**
## Autor ## Autor
**Ortiz Edgar Javier**. **Ortiz Edgar Javier**.

16
frontend/worker.js Normal file
View File

@ -0,0 +1,16 @@
export default {
async fetch(request, env, ctx) {
const url = new URL(request.url);
// Intentar servir el recurso estático desde el binding ASSETS
let response = await env.ASSETS.fetch(request);
// Soporte SPA: Si no existe (404), servir index.html para que React Router maneje la ruta
if (response.status === 404) {
const indexRequest = new Request(new URL("/index.html", request.url), request);
response = await env.ASSETS.fetch(indexRequest);
}
return response;
}
};

7
frontend/wrangler.toml Normal file
View File

@ -0,0 +1,7 @@
name = "repairit"
main = "worker.js"
compatibility_date = "2026-06-09"
[assets]
directory = "./dist"
binding = "ASSETS"