Hello

I use the method createServer from class http and then listen to a port as 
follows :

var server = http.createServer();
  server.listen(port, function () {
  ...
}

the problem is that I only have the service name 
and  listening to a service doesn't work :

var server = http.createServer();
  server.listen(service, function () {
  ...
}


so I need to read and parse the file /etc/services to get the port 
associated with the service 

is there a simpler way to get the port from the service ?

thanks in advance

Jean-Marie

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/cc49bb5a-73e3-410d-8ffc-4613c9e6c9bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to