I have an azure website which has a URL of something like : http://app.azurewebsites.net/. Now I have my server.js file that contains the following code:
var restify = require('restify');
function respond(req, res, next) {
res.send('hello ' + req.params.name);
next();
}
var server = restify.createServer();
server.get('/hello/:name', respond);
server.head('/hello/:name', respond);
server.listen(8080, function() {
console.log('%s listening at %s', server.name, server.url);
});
I have already committed my node_modules folder which contains the restify dependency. Now, when I hit http://app.azurewebsites.net:8080/hello/john I get no response back and query just times out !
When I hit http://app.azurewebsites.net/ in the debug window I see:
2015-01-22T16:53:27 Welcome, you are now connected to log-streaming service.
restify listening at http://0.0.0.0:8080
I am stuck and not sure why I am not getting "hello john" as a response in my browser. Can someone help me out here?