jam/test/test-jamshlib.js

26 lines
579 B
JavaScript
Raw Normal View History

2024-08-27 00:15:31 +02:00
var Shell = require('../build/jamsh/libjamsh.debug.js')
var options = {
modules : {
},
nameopts : {length:8, memorable:true, lowercase:true},
Nameopts : {length:8, memorable:true, uppercase:true},
output : function (msg) {
console.log('[LOG] '+msg);
},
outputAgent : function (msg) {
console.log('[AGE] '+msg);
},
outputAsync : function (msg) {
console.log('[ASN] '+msg);
},
server : true,
}
var cmd = Shell(options).init().cmd();
cmd.port(DIR.IP('http://localhost:10001'));
cmd.start()
cmd.exec('stats("vm")');
cmd.exec('stats("conn")');