It’s become clear to me that I am a below average programmer and there is no such thing as a working example of an express/socket.io server on the internet. Why am I getting this error when I try to load the page?
GET http://localhost:3700/socket.io/socket.io.js 404 (Not Found) I executed the following command inside of my working directory to install express and socket.io
Npm install My package.json file looks like this
{ "name": "RealTimeWebChat", "version": "0.0.0", "description": "Real time web chat", "dependencies": { "socket.io": "latest", "express": "latest", "jade": "latest" }, "author": "developer" } This created a “node_modules” directory, inside of which is a “socket.io” directory.
So why can’t my application find the socket.io.js file?
Other relevant information, I’m working off this tutorial. I’m following it word for word.
I have a .jade file that looks like this.
!!! html head title= "Real time web chat" script(src='/chat.js') script(src='/socket.io/socket.io.js') body #content(style='width: 500px; height: 300px; margin: 0 0 20px 0; border: solid 1px #999; overflow-y: scroll;') .controls input.field(style='width:350px;') input.send(type='button', value='send') Admittedly, I have no idea what jade is, but I'm just trying to get a simple example up and running. I learn best as I do. Final project is due on Sunday! Help I need a server!