I have installed a FreeBSD10 instance on Amazon EC2.
By using
I have put a simple HTTP server code in my directory:
/usr/ec2-user/app1/index.js
with code:
But I cannot connect to it from my browser using its public IP
The same HTTP server setting works successfully locally on my Mac.
What is the thing I am missing here?
By using
pkg
I have also installed nodejs, npm.I have put a simple HTTP server code in my directory:
/usr/ec2-user/app1/index.js
with code:
Code:
var koa = require('koa');// is an http app framework
var app = koa();
app.use(function * () {
this.body ='Hello World';
});
app.listen(3000);
But I cannot connect to it from my browser using its public IP
Code:
http://<publicIP>:3000
The same HTTP server setting works successfully locally on my Mac.
What is the thing I am missing here?