fqdn-multi
Version:
Get fqdn of machine. Multiplatform (Win & UX).
42 lines (24 loc) • 697 B
Markdown
<!-- toc -->
- [Purpose](
- [Usage](
- [OS Support](
- [Reference](
- [Breaking](
<!-- tocstop -->
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
```javascript
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](https://github.com/opentable/fqdn-nodejs).
The module is ESM Module style and uses `async`/ `await`.