Skip to content

Commit 0a38eb2

Browse files
authored
docs: update README in scripts and enviroment variables
1 parent 701be58 commit 0a38eb2

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
</p>
33

44
> [!TIP] <p align="justify">
5-
> **Service Status:** The API is optimized for Render's free tier, automatically managing cold starts and network constraints through a robust transport configuration. <br/> <p align="center">
5+
> To prevent `Connection Timeout` errors on Render's free tier, port **2525** must be used instead of 587. Additionally, the server should be executed with the `--dns-result-order=ipv4first` flag to ensure DNS resolution compatibility with email services. This project uses Brevo for email delivery. <br/> <p align="center">
66
[![Auth Mailer API CI/CD](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/ci.yml)
77
[![SecOps: CodeQL Analysis](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/codeql.yml/badge.svg?branch=main&event=push)](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/codeql.yml)
88
[![SecOps: DAST Dynamic Scan](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/dast.yml/badge.svg?branch=main&event=push)](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/dast.yml)
@@ -263,9 +263,9 @@ The following endpoints are tested:
263263
## 📄 Scripts (package.json)
264264
```bash
265265
"scripts": {
266-
"dev": "node --watch --env-file=.env src/server.js",
267-
"start": "node src/server.js",
268-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --detectOpenHandles --forceExit"
266+
"dev": "node --watch --dns-result-order=ipv4first --env-file=.env src/server.js",
267+
"start": "node --dns-result-order=ipv4first src/server.js",
268+
"test": "node --dns-result-order=ipv4first --experimental-vm-modules -r dotenv/config node_modules/jest/bin/jest.js --no-cache --detectOpenHandles --forceExit"
269269
}
270270
```
271271

@@ -412,10 +412,12 @@ npm install
412412
NODE_ENV=development
413413
PORT=4000
414414
DATABASE_URL=postgres://user:password@localhost:5432/emails_db
415-
EMAIL=
416-
GOOGLE_APP_PASSWORD=
415+
EMAIL=Brevo SMTP User ID
416+
GOOGLE_APP_PASSWORD=Brevo SMTP Master Password
417417
SECRET_KEY=
418418
EXPIRE_IN=1d
419+
SMTP_HOST=smtp-relay.brevo.com
420+
SMTP_PORT=Use 2525 for Render
419421
```
420422

421423
5. Run the server in development mode:
@@ -462,7 +464,7 @@ Developed by **Clio Salgado** as part of the Node.js & Backend module, with the
462464
</p>
463465

464466
> [!TIP] <p align="justify">
465-
> **Estado del Servicio:** La API se encuentra optimizada para el plan gratuito de Render, gestionando automáticamente el cold start y las limitaciones de red mediante una configuración de transporte robusta.<br/> <p align="center">
467+
> Para evitar errores de `Connection Timeout` en el plan gratuito de Render, se debe utilizar el puerto **2525** en lugar del 587. Además, es necesario ejecutar el servidor con el flag `--dns-result-order=ipv4first` para asegurar una resolución de DNS compatible con los servicios de correo. Este proyecto usa Brevo para el envío de correos.<br/> <p align="center">
466468
[![Auth Mailer API CI/CD](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/ci.yml)
467469
[![SecOps: CodeQL Analysis](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/codeql.yml/badge.svg?branch=main&event=push)](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/codeql.yml)
468470
[![SecOps: DAST Dynamic Scan](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/dast.yml/badge.svg?branch=main&event=push)](https://github.com/Clic-stack/Auth-Mailer-API/actions/workflows/dast.yml)
@@ -719,9 +721,9 @@ Los siguientes endpoints fueron testeados
719721
## 📄 Scripts (package.json)
720722
```bash
721723
"scripts": {
722-
"dev": "node --watch --env-file=.env src/server.js",
723-
"start": "node src/server.js",
724-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --detectOpenHandles --forceExit"
724+
"dev": "node --watch --dns-result-order=ipv4first --env-file=.env src/server.js",
725+
"start": "node --dns-result-order=ipv4first src/server.js",
726+
"test": "node --dns-result-order=ipv4first --experimental-vm-modules -r dotenv/config node_modules/jest/bin/jest.js --no-cache --detectOpenHandles --forceExit"
725727
}
726728
```
727729

@@ -869,10 +871,12 @@ npm install
869871
NODE_ENV=development
870872
PORT=4000
871873
DATABASE_URL=postgres://user:password@localhost:5432/emails_db
872-
EMAIL=
873-
GOOGLE_APP_PASSWORD=
874+
EMAIL=Brevo SMTP User ID
875+
GOOGLE_APP_PASSWORD=Brevo SMTP Master Password
874876
SECRET_KEY=
875877
EXPIRE_IN=1d
878+
SMTP_HOST=smtp-relay.brevo.com
879+
SMTP_PORT=Use 2525 for Render
876880
```
877881

878882
5. Corre el servidor en modo desarrollo:

0 commit comments

Comments
 (0)