2010-12-03 09:03:18 +08:00
|
|
|
common = require('../common');
|
2010-10-07 11:05:23 +08:00
|
|
|
assert = common.assert;
|
2010-02-06 09:14:14 +08:00
|
|
|
|
2010-12-03 09:03:18 +08:00
|
|
|
common.print('hello world\r\n');
|
2010-02-06 09:14:14 +08:00
|
|
|
|
2010-03-18 05:00:17 +08:00
|
|
|
var stdin = process.openStdin();
|
|
|
|
|
2010-12-03 09:03:18 +08:00
|
|
|
stdin.addListener('data', function(data) {
|
2010-04-20 06:22:59 +08:00
|
|
|
process.stdout.write(data.toString());
|
2010-02-06 09:14:14 +08:00
|
|
|
});
|
|
|
|
|
2010-12-03 09:03:18 +08:00
|
|
|
stdin.addListener('end', function() {
|
2010-04-20 06:22:59 +08:00
|
|
|
process.stdout.end();
|
2010-02-06 09:14:14 +08:00
|
|
|
});
|