How to get the hostname of the OS in Node.js?
Originally Published Here ๐!
To get the name or hostname of the OS, you can use the hostname() method from the os module in Node.js.
/* Get hostname of os in Node.js */
// import os module
const os = require("os");
// get host name
const hostName ...
melvingeorge-me.hashnode.dev1 min read