How profomarpinzon/demo-app works
This small infrastructure demo identifies which server handled a browser request. The dashboard polls the Express /api/info endpoint every five seconds, then displays the responding instance’s IP, hostname, instance name, and timestamp. Express also serves the dashboard’s static files. Server identity values are assembled in the API handler from host/network details, the current time, and the configured instance name. The excerpts show the polling and response logic; the HTML and styling are listed in the tree but were not inspected.
Main entry points: server.js Info endpoint · app.js Polling client · index.html Dashboard page
Components 7
Dashboard
- Dashboard page
public/index.html - Polling client
public/app.js
Server
- HTTP server
server.js - Info endpoint
server.js - Host identity
server.js
Other components
- Browser
- Host system
Connections 6
- HTTP server → Dashboard page: serves static files
server.js - Browser → Polling client: uses dashboard
README.md - Polling client → Info endpoint: polls every 5s
public/app.js - Info endpoint → Host identity: assembles response
server.js - Host identity → Host system: reads host details
server.js - Info endpoint → Polling client: returns JSON
public/app.js