Node services port choice

Not applicable

I have a node server listening on a port (say 9000) and hosted within the Apigee platform.

Assuming that I'm adding a second such service: does this port number need to be unique within my whole organisation or just the proxy I'm building?

Solved Solved
1 1 357
1 ACCEPTED SOLUTION

@stewartritchie ,

Welcome to Apigee Community.

This "port" argument is required in Node.js, but Apigee Edge ignores this parameter. Instead, the API proxy in which the Node.js script runs specifies the "virtual host" that it listens on, and the Node.js application uses those same virtual hosts, just like any other Apigee Edge proxy.

Even if you code,

svr.listen('ABCD', function() {
    console.log('Node HTTP server is listening');
});

It still works, since Apigee Edge ignores this parameter. Find more about same here.

View solution in original post

1 REPLY 1

@stewartritchie ,

Welcome to Apigee Community.

This "port" argument is required in Node.js, but Apigee Edge ignores this parameter. Instead, the API proxy in which the Node.js script runs specifies the "virtual host" that it listens on, and the Node.js application uses those same virtual hosts, just like any other Apigee Edge proxy.

Even if you code,

svr.listen('ABCD', function() {
    console.log('Node HTTP server is listening');
});

It still works, since Apigee Edge ignores this parameter. Find more about same here.