Home > Enterprise >  Node app is not reachable on EC2 insrance
Node app is not reachable on EC2 insrance

Time:01-20

I have deployed simple nodejs application on EC2 instance and modified all inbound rules to made port publicly accessible but even after that I am unable to access application.

below is my app:

server.js

const express = require('express');
const log = require('./logger');

const app = express();

app.get('/',(req,res) => {
 
    res.send("Happy logger");
 
 });

app.listen(2000,() => console.log("App is  listening"));     

Below is my inbound rules settings enter image description here

When I am hitting on ec2-3-82-196-99.compute-1.amazonaws.com:2000 url its showing below error.

enter image description here

Someone let me know what I am doing wrong.

CodePudding user response:

From your screenshot, you are accessing HTTPS in Chrome:

https://ec2-3-82-196-99.compute-1.amazonaws.com:2000.

As the commenter suggested, should use HTTP instead (make sure you see the 'Not secure' sign):

enter image description here

  •  Tags:  
  • Related