inst-node
v0.0.2
Published
```` var appvars = [1,2,3];
Downloads
2
Readme
var appvars = [1,2,3];
var cliplugin = {
name: 'app-vars',
func: function(){
return appvars;
}
}
require('dns').lookup(require('os').hostname(), function (err, add, fam) {
require('./inst.js').client({
interval: 1000,
/* out: console.log, */
/* server: 'http://localhost:3000/inst', */
items: ['arch', 'platform', 'versions', 'config', 'uptime'],
// these funcs run periodically
plugins: [ cliplugin ],
// these are sent only once at beginning
meta: {myip: add}
})
})
var express = require('express'), app = express();
var server = require('http').createServer(app);
app.use(express.bodyParser());
server.listen(3000);
console.log('master listening on 3000');
require('./inst.js').server({
/* route: '/inst', */
handle: function(s){ console.log('Server got:', s) }
}, app)