-
Notifications
You must be signed in to change notification settings - Fork 21
/
app.js
33 lines (25 loc) · 769 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'use strict'
// print toby.version
console.log(`node :: toby.version = ${toby.version}`);
var num = 42;
var foo = 'foo';
toby.on('test', function(x){
console.log(`node :: toby.on(test) = ${x}`);
});
var result = toby.hostCall('dory', {num, foo});
console.log(`node :: toby.hostCall() = ${result}`);
// var cluster = require('cluster');
// cluster.on('c', function(x){console.log(`node :: x`)});
// if (cluster.isMaster) {
// console.log('node :: im master');
// cluster.fork();
// cluster.emit('c', 'greeting from parent :)')
// } else {
// console.log('node :: im slave. bye bye');
// cluster.emit('c','greeting from child :o')
// process.exit(0);
// }
// exit after 2 secs
(function(){setTimeout(function(){
process.exitCode = 42;
},2000)})();