MCPcopy
hub / github.com/compodoc/compodoc / startDocumentationServer

Function startDocumentationServer

src/utils/documentation-server.ts:48–65  ·  view source on GitHub ↗
(configuration: DocumentationServerConfiguration)

Source from the content-addressed store, hash-verified

46}
47
48export function startDocumentationServer(configuration: DocumentationServerConfiguration): any {
49 const app = polka();
50 const root = path.resolve(configuration.root);
51 const serveStatic = sirv(root, { dev: true });
52 const onListening = () => {
53 if (configuration.open) {
54 openInBrowser(getServerUrl(configuration));
55 }
56 };
57
58 app.use(serveStatic);
59
60 if (configuration.host) {
61 return app.listen(configuration.port, configuration.host, onListening);
62 }
63
64 return app.listen(configuration.port, onListening);
65}

Callers 2

runWebServerMethod · 0.90
serveMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…