摘要:
前台页面使用jquery的jsonp来进行轮询。后端node.js监听的端口是8124 index.html Long Polling in node.jsloading... 1: 2: 3: 后台用node.js实现的polling.jsvar http = require('http'), fs = require('fs');http.createServer(function(req, res) { checkFile(req, res);}).listen(8124);var filepath = 'E:/Node_app/file/a.tx 阅读全文