Browse Source

Fixed mongo connection issue. We can connect to other Docker services by the name we define in the docker-compose.yml file

Cameron Kline 8 years ago
parent
commit
5737a7d65f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/app.js

+ 1 - 1
backend/app.js

@@ -27,7 +27,7 @@ const express          = require('express'),
 const global = require('./logic/global');
 
 // database
-const MongoDB = mongoose.connect(`mongodb://${config.get('domain')}:27017/musare`).connection;
+const MongoDB = mongoose.connect('mongodb://mongo:27017/musare').connection;
 
 MongoDB.on('error', err => {
 	console.log('Database error: ' + err.message);