MongoError: socket hang up
问题 I am trying to connect to the mongodb database on mongolabs(mlabs). I connect successfully when I run the code on my local computer and server.But When I run on my aws server I get this error database error { [MongoError: socket hang up] name: 'MongoError', message: 'socket hang up' } Code trial.js: var express = require('express'); var app = express(); var mongoose = require('mongoose'); var mongojs = require('mongojs'); var db = mongojs('mongodb://user:pass@ds01312192.mlab.com:133492