Connect Mongo Db To Remote Server Nodejs
I nave nodejs server and connecting to Mongo DB locally using mongoose as: mongooseQ.connect('mongodb://localhost:27017/YepiMobile'); How can I connect to mongo db that locating
Solution 1:
Does the second connection attempt fail for you, by reading Mongoose's documentation it seems like you have done it correctly:
mongoose.connect('mongodb://username:password@host:port/database?options...');
Maybe you are missing the credentials to the server? See this link for more information: http://mongoosejs.com/docs/connections.html, or see MongoDB's connection documentation: http://docs.mongodb.org/manual/reference/connection-string/.
Post a Comment for "Connect Mongo Db To Remote Server Nodejs"