in

AWS Cloud9: Making Express.js Server Publicly Available

Table of Contents

Make Public

When you create an EC2 Cloud9 instance, out of the box your preview will only be available in your native browser. IE it will be unavailable to anyone else you send the link to and you also will not be able to work with applications like Postman.

To make the application publicly available follow two steps.

1. Follow the AWS instructions here (Share a Running Application Over the Internet).

2. Modify the app.listen() listening port in your application to the remove the IP Address. I will look something like this

// set listen port
app.listen(8080, function(){
    console.log("Server Running");
});

Share

After you’ve made the server public you can always remind yourself of the IP address for sharing by clicking on the share button inside your IDE, which will then show you the application IP. You will need to tack the port onto the end of the IP listed here. Ex:

XX.XXX.XXX.XXX:8080

This will be the publicly available address for whichever application you are running on this instance (assuming you have more than one application on the instance)

Express + EJS: Styles and Partials

Express + Postman: Writing and Testing Routes