Simple utility to get the FQDN of a machine. Can be used synchronously or asynchronously
Why?: os.hostname() only returns the hostname rather than the FQDN
import fqdn from 'fqdn-multi';
const name = await fqdn();
console.log(name);
Works on Windows, Linux and MacOS
This code is based on the original code.
The module is ESM Module style and uses async
/ await
.