As in title, I created a snapshot of an AWS LAMP stack running a node.js server that works fine, then create another instance from that snapshot and get a 404 error for sockets.io. Been looking over the forums but can't seem to figure out what's wrong. The code is:
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var crypto = require('crypto');
const util = require('util');
const expressip = require('express-ip');
app.use(expressip().getIpInfoMiddleware);
...
http.listen(3000, function(){
...
});
Once the instance is created, I SSH into it and run the server JS script, which runs without errors.
Any idea what I'm doing wrong?
Here is a working example: http://52.62.156.187/demo.html
and the not working one: http://54.252.190.28/demo.html
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var crypto = require('crypto');
const util = require('util');
const expressip = require('express-ip');
app.use(expressip().getIpInfoMiddleware);
...
http.listen(3000, function(){
...
});
Once the instance is created, I SSH into it and run the server JS script, which runs without errors.
Any idea what I'm doing wrong?
Here is a working example: http://52.62.156.187/demo.html
and the not working one: http://54.252.190.28/demo.html