mantenimento-app 1.1.15 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,42 @@ npm run dev
33
33
  3. Apri:
34
34
 
35
35
  ```text
36
- http://localhost:3000
36
+ http://localhost:3001
37
+ ```
38
+
39
+ ## Puntare GitHub Pages a un backend dev separato
40
+
41
+ Il frontend gia supporta un endpoint backend esplicitamente configurato.
42
+ Per usare `https://favagit.github.io/mantenimento-app/` contro un backend dev reale:
43
+
44
+ 1. Pubblica il backend dev su un host HTTPS raggiungibile pubblicamente.
45
+ Esempio: `https://dev-api.example.com`
46
+ 2. Nel backend dev abilita CORS verso GitHub Pages:
47
+
48
+ ```env
49
+ CORS_ALLOWED_ORIGINS=https://favagit.github.io
50
+ ```
51
+
52
+ 3. Apri GitHub Pages con l'override runtime dell'API base:
53
+
54
+ ```text
55
+ https://favagit.github.io/mantenimento-app/?apiBase=https://dev-api.example.com
56
+ ```
57
+
58
+ Per usare anche il frontend del branch dev con un link unico:
59
+
60
+ ```text
61
+ https://favagit.github.io/mantenimento-app/?frontend=dev&env=dev
62
+ ```
63
+
64
+ `frontend=dev` apre la preview frontend del branch configurata in `supabase-config.js`,
65
+ mentre `env=dev` seleziona il backend dev.
66
+
67
+ L'override viene memorizzato in `localStorage`, quindi resta attivo anche ai refresh successivi.
68
+ Per tornare al backend di default:
69
+
70
+ ```text
71
+ https://favagit.github.io/mantenimento-app/?apiBase=reset
37
72
  ```
38
73
 
39
74
  ## Build frontend minificato