Created
November 26, 2015 00:16
-
-
Save JBreit/8fa445ab15d6ada96fd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var os = require('os'), | |
cluster = require('cluster'), | |
express = require('express'), | |
app = express(), | |
http = require('http'), | |
server = http.createServer(app), | |
logger = require('winston'); | |
var System = function () { | |
'use strict'; | |
this.name = os.hostname(); | |
this.platform = os.platform(); | |
this.type = os.type(); | |
this.release = os.release(); | |
this.arch = os.arch(); | |
this.upTime = os.uptime(); | |
this.loadAvg = os.loadavg(); | |
this.cpus = os.CPUs(); | |
this.freeMemory = os.freemem(); | |
this.totalMemory = os.totalmem(); | |
this.networkInterfaces = os.networkInterfaces(); | |
}; | |
/*function System () { | |
'use strict'; | |
};*/ | |
System.prototype = { | |
init: function () { | |
'use strict'; | |
logger.info('Starting initialization sequence...'); | |
}, | |
config: function (options) { | |
'use strict'; | |
}, | |
serve: function (port, host) { | |
'use strict'; | |
server.listen(port, host, function () { | |
logger.info('Listening at ' + host + ' on port ' + port); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment