[nodejs] Re: Synchronous http client

2013-02-12 Thread asynqronic
On Tuesday, February 12, 2013 6:18:19 PM UTC+7, vikram patil wrote: Thanks but its not known how many requests I am going to make ... e.g. if code reads a file will multiple http request it may or may not pipeline results based on configuration specified in that file. So my implementation

Re: [nodejs] Re: Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread asynqronic
On Monday, February 11, 2013 8:40:31 AM UTC+7, Suraj Singh Thapa wrote: Thanks Martin, Returning function resolved the issue, module.exports = function() { var spawn = require('child_process').spawn, ls= spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', function (data) {

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread asynqronic
On Tuesday, February 12, 2013 5:21:17 AM UTC+7, s thapa wrote: I am thinking of creating a refresh button because auto reload of webpage might froze webpage until data is extracted from server to client and this my annoy users. Any suggestion or sample code are welcome. In

Re: [nodejs] Need advice, STDOUT and STDERR of child_process asynchronously rander to index page

2013-02-11 Thread asynqronic
On Tuesday, February 12, 2013 9:06:22 AM UTC+7, s thapa wrote: Thanks asynqronic, Following code, *profiles3.js* module.exports = function(callback){ var spawn = require('child_process').spawn, ls = spawn('ls', ['-lh', '/usr']); ls.stdout.on('data', callback); ls.stderr.on