What runs perfectly well locally in homestead does not seem to be right for forge.
node -v
v0.10.37
npm -v
1.4.28
my socket.js
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var redis = require('redis');
server.listen(3000, function(){
console.log('Listening on Port 3000');
});
io.on('connection', function (socket) {
console.log("new client connected");
var redisClient = redis.createClient();
redisClient.subscribe('message');
redisClient.on("message", function(channel, message) {
console.log("mew message in queue "+ message + "channel");
socket.emit(channel, message);
});
socket.on('disconnect', function() {
redisClient.quit();
});
});
I guess it has to do with paths, while
node socket.js
works in homestead, on my envoyer/forge I have to do
current/socket.js
to start the server, but on the channel connection I get
GET https://mydomain.com:3000/socket.io/?EIO=3&transport=polling&t=1432220793670-25 net::ERR_CONNECTION_TIMED_OUT
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community