Hostname
Once upon a time, Node didn’t have a built-in module to get a computer’s hostname.
Version 1.0.0 and higher of this package is essentially a proxy to Node’s built-in module os.hostname().
If you are running a version of Node older than 0.3.3, please install the legacy version of this package using npm install hostname@0.0.3
.
Installation
npm install hostname
Usage
var hostname = require('hostname');
// Output hostname to console
console.log(hostname());
Licence
MIT