First i'd like to thank you for taking the time to try to help me.
I'm trying to do a web application online using node.js and socket.io for realtime. Here is my problem when i try my application in local it works but when i pushed it on heroku the server can't find my "herokuApp.heroku.com/socket.io/socket.io.js"
Of course i searched a lot for solve my problem but nothing here has solved it. Here is my files :
var express = require('express');
var app = express(),
server = require('http').createServer(app),
io = require('socket.io').listen(server),
ent = require('ent'), // Disable HTML caracters (equal htmlentities in PHP)
fs = require('fs');
app.use(express.static(__dirname + '/public_html'));
app.set('port', (process.env.PORT || 5000));
server.listen(5000);
io.sockets.on('connection', function (socket) {
socket.on("newMsg", function(data){
console.log("the client message: " + msg);});
});
app.get('/', function(request, response) {
response.send('Hello World!');
});
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
and in my index.html
<script src="/socket.io/socket.io.js"></script>
I add some information like the server response when i push my commit : http://puu.sh/irF05/e1c648c627.png
and the structure of my files : http://puu.sh/irF8V/8240318ae6.png (the code above is from index.js and i don't use server.js)
Thanks you again for having read this, i'm not really familiar with node or socket so please excuse me if the solution is simple.