diff --git a/README.md b/README.md index 33338dc..a653664 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,20 @@ docker compose down --remove-orphans * Arranca en puerto **80** internamente. * Código fuente en `ui/src/`, configuración en `vite.config.js`. +### Notificaciones en tiempo real (SSE) + +El backend expone un endpoint `/events` que utiliza **Server-Sent Events**. La +base de datos PostgreSQL emite mensajes mediante triggers y el servidor los +reenvía a los navegadores conectados. + +```javascript +const source = new EventSource('http://localhost:4000/events'); +source.onmessage = (e) => { + const data = JSON.parse(e.data); + console.log('Evento recibido', data); +}; +``` + #### Card Animation The data cards implemented in `ui/src/components/ui/NucleoDataCard.vue` now feature a subtle growing animation when hovered over. This animation is implemented purely with CSS using keyframes and transitions defined within the component's `