I am new in nodejs,In server (using ssh) i installed node (expressjs) and npm on server successfully, In app.js i put following code
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('<html><body><h1>Hello World</h1></body></html>');
});
var server = app.listen(3000, function () {
console.log('Node server is running..');
});
In xshell (command prompt) displaying message
"ubuntu@ip-***-**-*-***:~/admin/$ node app.js
Node server is running.."
Now i want to see Hello world in browser,How can i do this ?
For example my hostname is 11.111.11.111 and ip (displaying by xshell) is 222-22-2-222 And in ftp i put my code inside following directory /home/ubuntu/admin
I just want to know that how can i see output in browser ? I tried with following urls but not worked for me (hostname)
**.***.**.***/admin:3000