fqdn

utility to get fqdn of machine

Usage no npm install needed!

<script type="module">
  import fqdn from 'https://cdn.skypack.dev/fqdn';
</script>

README

FQDN

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

usage:

var fqdn = require("fqdn");

fqdn(function(err, res){
  if(err){
    throw err;
  }

  console.log(res);
});

/* OR */

var dn = fqdn();

Works on Linux and MacOS