From 445be6d03ccae05ff546579b02b7367d75722b38 Mon Sep 17 00:00:00 2001 From: Fabio Date: Fri, 7 Nov 2025 00:21:01 +0800 Subject: [PATCH] Aggiorna README.md --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c192e6c..5500919 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,60 @@ # Applicazione Flutter e relativo server json utilizzando MongoDB +## server + +```bash +npm init -y +npm install express nodemailer body-parser dotenv mongoose crypto express-rate-limit path +``` +lista dei packages installati + + npm list --depth=0 + +```bash +├── body-parser@2.2.0 +├── crypto@1.0.1 +├── dotenv@17.2.3 +├── express-rate-limit@8.2.1 +├── express@5.1.0 +├── mongoose@8.19.3 +├── nodemailer@7.0.10 +└── path@0.12.7 +``` +far partire con + + node index.js + modificare .env per il server -utilizza auth.patachina.it per comunicare +## utilizza auth.patachina.it per comunicare + +## interrogare il server con curl + +```bash +curl -X POST https://auth.patachina.it/api/verifica-email \ + -H "Content-Type: application/json" \ + -d '{ + "nome": "Fabio", + "cognome": "Micheluz", + "email": "fabio.micheluz@gmail.com", + "telefono": "+393331234567", + "applicazione": "flutter-app" + }' + +curl -X POST https://auth.patachina.it/api/conferma-codice \ + -H "Content-Type: application/json" \ + -d '{ + "email": "fabio.micheluz@gmail.com", + "codice": "323646" + }' + +curl -X POST https://auth.patachina.it/api/cancella_utente \ + -H "Content-Type: application/json" \ + -d '{ + "email": "fabio.micheluz@gmail.com" + }' +``` +## Settare nginx nginx è settato così ```bash @@ -49,4 +101,14 @@ nginx è settato così proxy_set_header X-Forwarded-Proto $scheme; } } -``` \ No newline at end of file +``` + +## fare i backup del codice + +da linux i server json + + zip -r authemailsvr.zip emailsvr2/ -x "*/node_modules/*" + +da android studio il flutter + + zip -r auth_svr.zip auth_svr -x "*/.*" -x "auth_svr/build/*" \ No newline at end of file