javascript - Windows Azure and restify with node js -


I have an auction website with some such URL: I now have my server.js file that has the following code:

  var restify = need ('restify'); Response to function (request, ridge, next) {res.send ('hello' + req.params.name); the upcoming(); } Var server = restify.createServer (); Server.get ('/ hello /: name', give feedback); Server.head ('/ hello /: name', give feedback); Server.listen (8080, function () {console.log ('% s listen on% s, server.name, server.url;)});  

I have already dedicated my node_module folder to which re dependent dependency is included. Now, when I feel that I do not get any feedback and just time out inquiries!

When I hit the debug window I see:

  2015-01-22T16: 53: 27 Welcome, now you are connected to log-streaming service. Stop listening to Http://0.0.0.0:8080  

I know why I can not find "Hello John" as a response in my browser, and it's not sure is. Can somebody help me out?

This is probably because you got your port to 8080 < / Code>.

Do this instead:

  var restify = need ('restify'); Var port = process.env.PORT || 8080; Response to function (request, ridge, next) {res.send ('hello' + req.params.name); the upcoming(); } Var server = restify.createServer (); Server.get ('/ hello /: name', give feedback); Server.head ('/ hello /: name', give feedback); Server.listen (port, function () {console.log (listen on% s, server.name, server.url);});  

Note that I've added a port variable and it's server.listen (port, ...


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -