NodeJS实时示例
我发现这个 http://blog.new-bamboo.co.uk/2009/12/7/real-time-online-activity-monitor-example-with-node-js-and-websocket 我可以启动服务器,但访问“iostat-client.html”显示“连接已关闭”。这里有人尝试过这个例子吗?或者有人知道其他类似的实时例子吗? 更具体地说 -
> # cat child3.js
> spawn = require('child_process').spawn;
>
> tail = spawn('tail -f
> /home/laks/ruby/txt.log');
>
> tail.stdout.on("output",function(data){
> console.log(data); });
如何确保上面的输出(它不起作用)出现在端口 8080 上的 http 上?
I found this http://blog.new-bamboo.co.uk/2009/12/7/real-time-online-activity-monitor-example-with-node-js-and-websocket
I can start the server but accessing "iostat-client.html" displays "connection closed". Anyone from here tried this example? Or Does any one know other similar real time examples?
More specifically -
> # cat child3.js
> spawn = require('child_process').spawn;
>
> tail = spawn('tail -f
> /home/laks/ruby/txt.log');
>
> tail.stdout.on("output",function(data){
> console.log(data); });
How to make sure ,output(its not working) from above appears over http on port 8080?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现这个 http://nodetuts。 com/tutorials/2-webtail-nodejs-child-processes-and-http-chunked-encoding.html
I found this http://nodetuts.com/tutorials/2-webtail-nodejs-child-processes-and-http-chunked-encoding.html