CSS and JS in production of NodeJS + ExpressJS + Socket.IO

-1

I have a problem in a chat that uses NodeJS + ExpressJS + Socket.IO. There are no problems in the local environment. However, when I put it into production I'm having problems with CSS's and JS's. I open the page in Chrome, check the Network tab of the inspect and see that some files are marked as pending. This does not always happen but it is happening fairly often. In other words, things are taking a long time to load. What could this be? Sometimes it goes quickly sometimes.

I'm using a dedicated server that can be seen here: link What I have here is the dedicated standard.

I have tried to do basic things in NodeJS and go up to test and it stays the same thing.

The test page is: link

    
asked by anonymous 20.03.2014 / 13:47

1 answer

1

The request is being made to the wrong address.

At the beginning of index.js has

var endereco = "http://192.168.1.100:3000/";

But the IP address of grupicrm.com.br is 198.1.103.47 - change to:

var endereco = "http://198.1.103.47:3000/";

Another thing: It looks like HostGator does not allow sockets, unless you have a dedicated server and make a request by opening a ticket:

link

See the table in Portuguese (look for Socket Server):

link

    
20.03.2014 / 14:00