Tag: lighty

无法使用Lighttpd访问Raspberry Pi上的socket.io.js

自从昨天以来,我对Node.JS和Socket.IO完全陌生。 我尝试使Node.JS和Socket.IO在我的Raspberry Pi上工作,但似乎没有。 我无法访问<myip>:1337/socket.io/socket.io.js 。 我遵循这个教程,所以我的Lighttpd.conf文件看起来像这样: $HTTP["host"] == "<myURLtomywebsite>" { proxy.server = (" " => (( "host" => "<myIP>", "port" => 1337) ) ) 我的server.js看起来像这样: var http = require('http'); httpServer = http.createServer(function(req, res) { res.end('Hello World!'); }); httpServer.listen(1337); var io = require('socket.io').listen(httpServer); var clients = 0; io.sockets.on('connection', function(socket) { ++clients; socket.on('disconnect', function(data) { –clients; io.sockets.emit('disusr', […]