Please refer to the documentation.
You are trying to go to an address that contains an IP of
0.0.0.0. The default, built-in behavior of the AWS Cloud9 IDE is that this will attempt to go to your local computer instead of attempting to go the instance or your own server that is connected to the environment.
So in your case, the HTML file you open in the Cloud9 IDE tries to connect to
localhost which is then translated to your local machine, not the EC2 instance your Cloud9 environment (and your NodeJS server) runs on.
Instead, consider changing the target host in your HTML file.
- Start your NodeJS server in the terminal as described in your tutorial
- In Cloud9, go to Tools --> Preview --> Preview Running Application
- A new IDE tab will open, where you can see the output like "Welcome to your server"
- In that new preview tab, click on the address bar and copy the URL you'll find there, it will be something like
https://12a34567b8cd9012345ef67abcd890e1.vfs.cloud9.us-west-1.amazonaws.com(with a different ID and probably a different region)
localhostin the HTML file with the host name from above
- Save your HTML file and try to test your app again
Alternatively, just make the action in your HTML form to a relative URL:
<form action="/login" method="POST">
Cloud9 will automatically forward the requests to your running application on ports 8080, 8081, or 8082. See the documentation for details.
Device farm: How to add NodeJS cucumber-html reports to customer artifact ?asked 9 months ago
I would like to connect AWS DocumentDB locally to NodeJS.asked 6 months ago
S3 client segmentation fault in NodeJS worker threadasked 9 months ago
Trouble in node.js sending data from html form to the server.asked 7 months ago
AWS EMR issue in Running NodeJs streaming programasked 4 months ago
How to communicate with GameLift Server with Java Clientasked a year ago
NodeJs server SDKasked 6 years ago
Installing NodeJS + NPM in a Build fleet (not Realtime Script)asked 5 months ago
Greengrass v2 interact with shadows from a nodejs lambdaAccepted Answerasked 6 months ago
FIREWALL PORT 3443 ENABLED; NODEJS Listening; fail to connect.asked 3 years ago