Socket.io links dont work

I have problem with links, they didin't work on client side (socket.io)

How can i get access to src img and page like this? /file/src.jpg?

Only work when i give hyperlink something like this www.example.com/coscosoco.jpg

Try making a simple routes in your request and response page. So, whenever there is a request for any file, for example /file/src.jpg it will look into the directory for example public.

var http = require('http');
var fs = require('fs');
var mime = require('mime');
var path = require('path');

http.createServer(function(request, response)
{
   // Hoping you have all your files inside a folder, here its called public
   fs.readFile('./public'+request.url, function(err, data){

     // @param data will be the requested file.
     response.end(mime.lookup(path.basename(data)));
   });
})

If this doesn't work you can share your code.