diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..a7aa6a9 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Credenciales de la API SI3 del Banco Central de Chile (https://si3.bcentral.cl). +# Server-only: se leen exclusivamente en Route Handlers / lib server-side. +# Nunca prefijar con NEXT_PUBLIC_ (eso las expondría al navegador). +BCENTRAL_USER= +BCENTRAL_PASS= diff --git a/.gitignore b/.gitignore index 935ba89..cb0e6cb 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env* +!.env.example # vercel .vercel diff --git a/README.md b/README.md index 8183629..776dd1c 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,13 @@ Requisitos: Node 26+, npm. ```bash npm install +cp .env.example .env.local npm run dev ``` -Abrir [http://localhost:3000](http://localhost:3000). No se necesitan variables de entorno: la app consulta `https://mindicador.cl/api` directamente desde sus propios Route Handlers. +Completar `.env.local` con `BCENTRAL_USER`/`BCENTRAL_PASS` — credenciales de la API SI3 del Banco Central de Chile (requiere registro en [si3.bcentral.cl](https://si3.bcentral.cl)). Son server-only: se leen únicamente en Route Handlers/lib del lado del servidor, nunca en componentes cliente. + +Abrir [http://localhost:3000](http://localhost:3000). Otros scripts disponibles: