logListeningOn() — astro Function Reference
Architecture documentation for the logListeningOn() function in log-listening-on.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2562c872_6018_1c23_f06c_cb53aad8e489["logListeningOn()"] f924c5ec_b86a_e284_c9c3_d5d9b3562d39["log-listening-on.ts"] 2562c872_6018_1c23_f06c_cb53aad8e489 -->|defined in| f924c5ec_b86a_e284_c9c3_d5d9b3562d39 2bf21e2b_26c3_3478_5d5a_d9c34152da58["getResolvedHostForHttpServer()"] 2562c872_6018_1c23_f06c_cb53aad8e489 -->|calls| 2bf21e2b_26c3_3478_5d5a_d9c34152da58 726a2ff2_ad33_a741_55cc_94f613b17c1f["getNetworkAddress()"] 2562c872_6018_1c23_f06c_cb53aad8e489 -->|calls| 726a2ff2_ad33_a741_55cc_94f613b17c1f style 2562c872_6018_1c23_f06c_cb53aad8e489 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/node/src/log-listening-on.ts lines 9–28
export async function logListeningOn(
logger: AstroIntegrationLogger,
server: http.Server | https.Server,
configuredHost: string | boolean | undefined,
) {
await new Promise<void>((resolve) => server.once('listening', resolve));
const protocol = server instanceof https.Server ? 'https' : 'http';
// Allow to provide host value at runtime
const host = getResolvedHostForHttpServer(configuredHost);
const { port } = server.address() as AddressInfo;
const address = getNetworkAddress(protocol, host, port);
if (host === undefined || wildcardHosts.has(host)) {
logger.info(
`Server listening on \n local: ${address.local[0]} \t\n network: ${address.network[0]}\n`,
);
} else {
logger.info(`Server listening on ${address.local[0]}`);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does logListeningOn() do?
logListeningOn() is a function in the astro codebase, defined in packages/integrations/node/src/log-listening-on.ts.
Where is logListeningOn() defined?
logListeningOn() is defined in packages/integrations/node/src/log-listening-on.ts at line 9.
What does logListeningOn() call?
logListeningOn() calls 2 function(s): getNetworkAddress, getResolvedHostForHttpServer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free