xPulse
πŸ‡¬πŸ‡§ EN
Pages
Contents

API

init()

await http.init();

Loads configuration and initializes the server.

start()

http.start();

Starts the server (blocking).

stop()

await http.stop();

Stops the server (graceful).

route(method, path, handler)

http.route('GET', '/tool/:tool/:page?', (req, res) => {
res.send(`Tool: ${req.params.tool}`);
});

Supports URL parameters and optional segments with ?.

notFound(handler)

http.notFound((req, res) => {
res.status(404).send('<h1>Not found</h1>');
});

Sets a global 404 handler.

Events

Trace ID

Each request gets a traceId. It is attached to:

en/api.md 2026-03-19