getHostInfoFromPort
@tsed/core
Usage
typescript
import { getHostInfoFromPort } from "@tsed/core";Overview
ts
function getHostInfoFromPort(protocol: string, addressPort: any): {
protocol: string;
address: string;
port: number;
toString(): string;
};Description
Parses an address-port combination and returns host information with protocol.
Accepts either a numeric port or a string in the format "address:port". Returns an object with protocol, address, port, and a toString method for URL formatting.
protocol
ts
protocol: string;address
ts
address: string;port
ts
port: number;toString
ts
toString(): string;