Probeer:
mongodb.MongoClient.connect('mongodb://mongo:27017', ... );
Wijzig uw docker-compose.yml
:
version: "2"
services:
web:
build: .
volumes:
- ./:/app
ports:
- "3000:3000"
links:
- mongo
mongo:
image: mongo
ports:
- "27017:27017"
En gebruik enkele docker-commando's:
docker-compose down
docker-compose build
docker-compose up -d mongo
docker-compose up web