mantenimento-app 1.1.15 → 2.1.0
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 +36 -1
- package/app.js +1685 -81
- package/backend/server.js +35 -3
- package/frontend/public/app.js +1685 -81
- package/frontend/public/index.html +72 -16
- package/frontend/public/styles.css +594 -2
- package/frontend/public/supabase-config.js +15 -0
- package/frontend/public/termini.html +21 -4
- package/package.json +3 -2
- package/scripts/build-frontend.mjs +38 -3
- package/scripts/dev-server.mjs +28 -0
package/README.md
CHANGED
|
@@ -33,7 +33,42 @@ npm run dev
|
|
|
33
33
|
3. Apri:
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
http://localhost:
|
|
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
|