My local app loads and everything run fine, but once i put it on the ec2 amazon server and run node server.js
and load the url - nothing happen, no even errors.
Here is what the script looks on both sides (local and amazon - ec2)
var express = require('express'),
app = express(),
server = require('http').createServer(app),
io = require('socket.io').listen(server),
port = process.env.PORT || 3000;
app.use(express.static(__dirname + '/public'));
io.sockets.on('connection', function(socket) {
console.log('a user connected');
});
io.sockets.on('error', function (err) {
console.log(err);
console.log("Error: " + err.message);
});
server.listen(port);
help? suggestion? ideas?
Aucun commentaire:
Enregistrer un commentaire