Is the node.js code being run from a container or from the host? If it's on the host, just use the localhost address i.e: var url = 'mongodb://localhost:27017';
DOWNLOAD: https://tinurli.com/2ewdbu
DOWNLOAD: https://tinurli.com/2ewdbu
connect-to-mongodb-from-another-docker-container
3925e8d270