So, a 'service' is a logical human thing, not a fixed, networking thing. The items in /etc/services are just a handy 'commonly used' mapping, but aren't strictly or adhered to or used to configure the applications on your host. You can listen to HTTP on port 1337 just as well as you can on port 80 (with proper permissions). You can get the ports that a *currently running* process is using, but I don't think that helps you.
It seems you're trying to listen to a port and respond with HTTP traffic. A common pattern to dynamically choose the port to listen to is with environment variables.
var server = http.createServer();
server.listen(process.env.PORT, function () {
...
}
And then start the application by specifying the port on the command line:
$ PORT=1337 node server.js
This lets you change the port easily without modifying the code or run multiple copies of your server listening to different ports at the same time.
HTH,
Mikkel