0
votes

I have a Node Express application and i want to implement a socket.io, but when I want import the socket.io library the javascript console shows to me:

Failed to load resource: the server responded with a status of 404 (Not Found) http: //localhost:3000/socket.io/socket.io.js

My Jade code is as follows

extends layout

block content
    script(src="/javascripts/jquery-2.0.3.min.js")
    script(src="/socket.io/socket.io.js")
        //var socket = require('./sockets');
        //var socket = io.connect();

form(name='room', action='', method='post')
    input(id='roomName', type='text', name='roomName')
    input(id='button', type='button', value='crear sala' onclick='addRoom()')

The things that I've done already:

->I've installed the socket package via npm correctly. ->I've tried to load the socket.io.js from my browser but the full route isn't created in my app.js

Regards

1

1 Answers

1
votes

In order to access socket.io.js, you must have a Socket.IO server running.