I'm unable to run a simple hello world application on a compute engine VM, which successfully runs locally and on Heroku:
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.send('Hello World!');
});
var port = process.env.PORT || 8080;
app.listen(port, function() {
console.log('Listening on port: ' + port);
});
Then looking at Google's Node on GCP Demo, I created a firewall rule to allow traffic to 8080 named "default-allow-http-8080"
The problem is when I visit http://[EXTERNAL_IP]:8080, it times out. Is there something I'm missing? I’m a beginner at Linux and new to networking, so any pointers are welcome!
via Awkard Typo
No comments:
Post a Comment