This package will provide basic operating system profile which can be used for many different purposes.
npm install lbmesh-os --save
const server = require('lbmesh-os').profile()
console.log (server);
/** Output from Console.Log running on Mac OS **/
{ cwd: '/Users/username/ostest',
hostname: 'MacBook.local',
release: '18.2.0',
platform: 'darwin',
homedir: '/Users/username',
arch: 'x64',
type: 'Darwin'
}
Works cross-platform.
Copyright © Jamil Spain. Release under the MIT License.