No description
  • HTML 87.6%
  • JavaScript 12.4%
Find a file
2026-08-25 19:15:45 +02:00
index.html Update index.html 2026-08-25 19:15:45 +02:00
package.json Web Pip-Boy + master server (Node en un solo proceso) 2026-08-05 21:19:16 +02:00
README.md update 2026-08-18 21:03:56 +02:00
server.js Web Pip-Boy + master server (Node en un solo proceso) 2026-08-05 21:19:16 +02:00

F4MP — Web + Master Server

English · Español

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:
    { "name": "My server", "region": "EU", "port": 7779, "players": 3, "maxPlayers": 32 }
    
    Servers expire after 30 s without a heartbeat.

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)

English · 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:
    { "name": "Mi servidor", "region": "EU", "port": 7779, "players": 3, "maxPlayers": 32 }
    
    Los servidores caducan a los 30 s sin heartbeat.

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.