jsarcade
jsarcade copied to clipboard
RTS: httpserver.js sends data as text/plain
I've installed Node.js v0.10.23 on Mac OS X 10.9
Node.js writes by default data as 'text/plain' which isn't interpreted by the browser as proper HTML. In order to get HTML response need to set header to 'text/html' just before response.write() row. Like that:
response.writeHeader(200, {"Content-Type": "text/html"});