Socket.io 404 with AWS LAMP Stack Instance Created From a Working Snapshot Not Working


Joined
Mar 2, 2021
Messages
1
Reaction score
0
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
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top