My site static files are not served (node app on Amazon AWS)

Or A Source

I installed a simple node.js / express website using the instructions on this page:

It seems like that everything is working well when i specify the port number (5000), as you can see in the following:

however, when you remove the port number, all the static files cannot be found and you can see the result here:

The node/express page saving looks like this:

app.get('/images/*', function(req,res) { var url = __dirname + '/public' + req.url; res.sendfile(url); });

app.get('/', function(req,res) { var home = __dirname + '/public/index.html'; res.sendfile(home); }); Is there anything i'm missing here?




answered 4 years ago sai #1

add the following configuration so that Nginx acting as a proxy redirect to port 3000 traffic from the server when we come from “"

See the original post:

Node.js + Nginx - What now?

comments powered by Disqus