Program_Sauce
Program_Sauce

Reputation: 283

How to change the folder where socket.io is fetching the socket.io.js JavaScript file?

The statement

<script src="/socket.io/socket.io.js"></script>

looks for socket.io.js in the 'public' folder instead of node_module.

Changing the url to ../node_module/socket.io/socket.io.js does not work.

How do I change the default folder which src looks into?

Upvotes: 1

Views: 136

Answers (1)

Chandu
Chandu

Reputation: 4561

socketio sever when receives the request '/socket.io/socket.io.js' , it dynamically builds the content ( considering the transports configured to be supported by the server ).

The file is neither served from public / node modules.

Upvotes: 1

Related Questions