Closed felixbrucker closed 7 years ago
FYI this is already available in the core7 tree:
const node = new storj.Node({
// ...
contact: {
// ...
port: 80
}
});
node.listen(10001);
That said, will happily merge this to add the capability now. Can you include a unit test in for the Transport
class that asserts that listenPort
is used is supplied?
i'll play around and try :)
Edit: seems to work!
Allow the use of an optional different listening port to be supplied for the rpc server to bind to.
This is useful when starting storjshare with the
rpcPort: 80
andlistenPort: 10001
and a nginx reverse proxy configured to proxy from 80 -> 10001. In such a case storjshare can still run as non-root and one is able to neatly manage all dns and address configuration via nginx.