我正在使用下面的代碼https://gist.github.com/2031681爲簡單的聊天應用程序。node.js和websocket模塊聊天返回沒有數據
我跑node chat-server.js
並獲得
Tue Jan 08 2013 15:45:52 GMT+0200 (IST) Server is listening on port 1337
我試圖通過http://localhost:1337/chat.html
訪問,並得到以下
No data received
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
我是新來的node.js,我不知道在哪裏這個問題可能來自
''socket.io'與'node.js'是一個簡單的解決方案。對於示例聊天系統:http: //psitsmike.com/2011/09/node-js-and-socket-io-chat-tutorial/和'socket.io'很容易安裝在node:http://socket.io/中。我不是說這個是錯誤的,只是這是一個更簡單的方式來使用套接字和節點 – ashley
它應該是'frontend.html'不是嗎? – vinayr
@vinayr是的,但它給了我完全相同的結果 – ilyo