getHostnamePort() — astro Function Reference
Architecture documentation for the getHostnamePort() function in node.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD b163737b_3a29_d74b_5366_82483039b590["getHostnamePort()"] 81a03fae_a2bc_f6d1_94ef_f29ffefe8af6["node.ts"] b163737b_3a29_d74b_5366_82483039b590 -->|defined in| 81a03fae_a2bc_f6d1_94ef_f29ffefe8af6 859c2d6f_02be_836d_7e05_a64bead34fc2["createRequest()"] 859c2d6f_02be_836d_7e05_a64bead34fc2 -->|calls| b163737b_3a29_d74b_5366_82483039b590 style b163737b_3a29_d74b_5366_82483039b590 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/app/node.ts lines 242–246
function getHostnamePort(hostname: string | string[] | undefined, port?: string): string {
const portInHostname = typeof hostname === 'string' && /:\d+$/.test(hostname);
const hostnamePort = portInHostname ? hostname : `${hostname}${port ? `:${port}` : ''}`;
return hostnamePort;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getHostnamePort() do?
getHostnamePort() is a function in the astro codebase, defined in packages/astro/src/core/app/node.ts.
Where is getHostnamePort() defined?
getHostnamePort() is defined in packages/astro/src/core/app/node.ts at line 242.
What calls getHostnamePort()?
getHostnamePort() is called by 1 function(s): createRequest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free