nx.js
NamespacesSwitchFunctions

resolveDns

resolveDns(hostname): Promise<string[]>

Performs a DNS lookup to resolve a hostname to an array of IP addresses.

Parameters

ParameterType
hostnamestring

Returns

Promise<string[]>

Example

const ipAddresses = await Switch.resolveDns('example.com');

On this page