HTTP Status Code 200 but page does not load Node.js Socket.io ― Node.js Tutorial With Socket.io, Daniel Nill, fs.readFile(), socket.html
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Learning about node.js and socket.io and working through this tutorial by Daniel Nill . The server starts no problem. However, when I navigate to localhost:8001/socket.html, I get the default error message. So I changed the switch statement to be '/socket.html' as opposed to 'socket.html'. The page now loads with status code 200, but nothing is rendered to screen. The screen should say "This is our socket.html file". What gives? The server side js code is var http = require("http"); var url = require('url'); var fs = require('fs'); var