Please read my question,even a small piece of advice will be received with gratitude.
I am getting the following error in Google Chrome:
GET http://localhost/socket.io/?EIO=3&transport=polling&t=1419089743449-2 404 (Not Found)
My folder setup is as follows:
localhost
pro
public
socket.io/socket.io.js
cssfile.css
jsfile.js
app.js
node_ modules
It seems to me that the request made by the client for the handshake is wrong because the error should be localhost/pro/public/socket.io/blah blah .
I am using the following setup:
web.config :
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="DynamicContent">
<match url="/pro/" negate='True'/>
<!--<conditions>
<add input="pro" matchType="IsFile" negate="True"/>
</conditions>-->
<action type="Rewrite" url="app.js"/>
</rule>
<rule name="LogFile" patternSyntax="ECMAScript">
<match url="socket.io"/>
<action type="Rewrite" url="app.js"/>
</rule>
</rules>
</rewrite>
client side js:
var socket = io.connect('http: //localhost', {resource: 'pro/public/socket.io' });
server side js(node):
var http = require('http');
var express = require('express');
var app = express();
var port = process.env.PORT || 3002;
var server = http.createServer(app).listen(port);
io = require('socket.io').listen(server, { resource : '/pro/public/socket.io' });
I get html as expect and the static files are served as well; I just can't get socket.io to work.