MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / addRoute

Method addRoute

tests/server.ts:62–70  ·  view source on GitHub ↗
(
    path: string,
    handler: (req: IncomingMessage, res: ServerResponse) => void,
  )

Source from the content-addressed store, hash-verified

60 }
61
62 addRoute(
63 path: string,
64 handler: (req: IncomingMessage, res: ServerResponse) => void,
65 ) {
66 if (this.#routes[path]) {
67 throw new Error(`Route ${path} was already setup.`);
68 }
69 this.#routes[path] = handler;
70 }
71
72 #handle(req: IncomingMessage, res: ServerResponse) {
73 const url = req.url ?? '';

Callers 5

input.test.tsFile · 0.80
network.test.tsFile · 0.80
emulation.test.tsFile · 0.80
console.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected