- HTML 87.6%
- JavaScript 12.4%
| index.html | ||
| package.json | ||
| README.md | ||
| server.js | ||
F4MP — Web + Master Server
A single Node project that serves the Pip-Boy website and acts as the master server (live server list). Same origin → no CORS; the site requests /servers relatively. The website is bilingual (EN/ES) with a language toggle in the top bar.
Structure
web/
├── index.html The Pip-Boy website (self-contained, bilingual)
├── server.js Node: serves the site + API (/servers, /heartbeat)
├── package.json
└── README.md
Endpoints
GET /→ the website.GET /servers→ live server list (JSON). The site polls it every 10 s.POST /heartbeat→ an F4MP server registers itself. JSON body:
Servers expire after 30 s without a heartbeat.{ "name": "My server", "region": "EU", "port": 7779, "players": 3, "maxPlayers": 32 }
Run
Requires Node.js. No dependencies to install.
node server.js
# or
npm start
Defaults to port 8080 (change it with the PORT env var). Open http://localhost:8080.
Test the server list
With no real servers yet, register a test one with curl:
curl -X POST http://localhost:8080/heartbeat -H "Content-Type: application/json" ^
-d "{\"name\":\"Test\",\"region\":\"EU\",\"port\":7779,\"players\":2,\"maxPlayers\":32}"
Refresh the site and it'll appear under Servers.
F4MP — Web + Master Server (Español)
Un solo proyecto Node que sirve la web Pip-Boy y hace de master server (lista de servidores en vivo). Mismo origen → sin CORS; la web pide /servers en relativo. La web es bilingüe (EN/ES) con un botón de idioma en la barra superior.
Estructura
web/
├── index.html La web Pip-Boy (autocontenida, bilingüe)
├── server.js Node: sirve la web + API (/servers, /heartbeat)
├── package.json
└── README.md
Endpoints
GET /→ la web.GET /servers→ lista de servidores vivos (JSON). La consume la web cada 10 s.POST /heartbeat→ un servidor de F4MP se registra. Cuerpo JSON:
Los servidores caducan a los 30 s sin heartbeat.{ "name": "Mi servidor", "region": "EU", "port": 7779, "players": 3, "maxPlayers": 32 }
Ejecutar
Requiere Node.js. No hay dependencias que instalar.
node server.js
# o
npm start
Por defecto en el puerto 8080 (cámbialo con la variable PORT). Abre http://localhost:8080.
Probar la lista de servidores
Sin servidores reales aún, puedes registrar uno de prueba con curl:
curl -X POST http://localhost:8080/heartbeat -H "Content-Type: application/json" ^
-d "{\"name\":\"Prueba\",\"region\":\"EU\",\"port\":7779,\"players\":2,\"maxPlayers\":32}"
Refresca la web y aparecerá en la sección Servers.