Skip to content

DevtoolsHandle

Defined in: devtools/server.ts:63

shoehive.devtools: present only when devtools is enabled.

readonly path: string

Defined in: devtools/server.ts:65

The inspector's HTTP path, for example '/__shoehive'.

handleRequest(req, res): boolean

Defined in: devtools/server.ts:80

Answers a devtools HTTP request and returns true, or returns false (without touching res) for any other path. attach() already routes devtools paths ahead of the app's request listeners; call this from your own handler only when your HTTP stack cannot be wrapped that way (listeners added after attach(), or a framework that owns dispatch):

http.on('request', (req, res) => {
if (shoehive.devtools?.handleRequest(req, res)) return;
app(req, res);
});

IncomingMessage

ServerResponse

boolean