2

I'm developing a node.js application on AWS Cloud9 environment.I'm using express to run a local server.I have installed express version 4.17.1 and using node version 10.6.3.I want to run or preview my application on port 8081 or 8082 but it isn't previewing. Url i'm pasting is https://blablabla.vfs.cloud9.us-east-1.amazonaws.com:8081/ and it shows The web page at https://blablabla.vfs.cloud9.us-east-1.amazonaws.com:8081/ might be temporarily down or it may have moved permanently to a new web address.. Note- In past it used to run on different ports like 8081,8082.Take a look at this code which i'm using.

var express=require('express');
var app=express();
app.get("/",function(req,res){
   res.send("cfg"); 
});
app.listen(8081,process.env.IP);

It is running on default port 8080 ie if we replace 8081 in above code with process.env.PORT, it shows the ouput "cfg" on browser.I know it's a easy one but please check this issue once, maybe there is some problem with my ec2 instance.

Vaibhav
  • 49
  • 1
  • 4

0 Answers0