Saturday 17 August 2013

Creating an Sails.js Application on AWS AMI instance

Creating an Sails.js Application on AWS AMI instance

So I followed the directions here and created a sample application on a
brand new linux machine.
No Apache, no anything, trying to use Node, express, etc to handle
incoming http requests.
Sails says:
info: Server lifted in `/home/ec2-user/simKeynes`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.
debug: --------------------------------------------------------
debug: :: Fri Aug 16 2013 17:22:27 GMT+0000 (UTC)
debug:
debug: Environment : development
debug: Port : 1337
but when I go to the associated IP address http://54.214.44.52:1337/ I see
nothing.
Checking Chrome's dev tools I see no response, and the browser displays:
Oops! Google Chrome could not connect to 54.214.44.52:1337
This is definitively not the hello world page.
I have Node.js 0.10 running, a previous install of express, sails, mongo,
mongoose, ruby, and that's about it.
Where did I go wrong?

2 comments:

  1. In AWS console, you need to allow the port which has to be open for public.

    ReplyDelete
  2. Yep, in AWS there are Security Groups and you need to enable the inbound traffic to that port from everywhere (0.0.0.0/0) to be able to reach your application. Create a custom TCP rule, add port 1337 and you should be good to go.

    ReplyDelete