How to configure MONGO_URI

50 views
Skip to first unread message

Charlie Furniss

unread,
Jun 20, 2016, 1:44:21 PM6/20/16
to mongodb-user
Hi there

I'm trying to deploy a Node.js app (actually Keystone.js) to Digitial Ocean using Distelli. And I can't configure the MONGO_URI variable correctly in the .env file.

The docs spell this out as:

mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

They say that the only required element is the host1 portion, which can be either a hostname, IP address, or UNIX domain socket. 

I can't work out what this should be in my case. Can anyone tell me where I can find this?

Thanks
Charlie

Kevin Adistambha

unread,
Jun 28, 2016, 9:17:39 PM6/28/16
to mongodb-user

Hi Charlie,

I’m trying to deploy a Node.js app (actually Keystone.js) to Digitial Ocean using Distelli. And I can’t configure the MONGO_URI variable correctly in the .env file.
The docs spell this out as:

mongodb://[username:password@]host1[:port1][,host2[:port2],…[,hostN[:portN]]][/[database][?options]]


They say that the only required element is the host1 portion, which can be either a hostname, IP address, or UNIX domain socket.
I can’t work out what this should be in my case. Can anyone tell me where I can find this?

You would need to provision a separate MongoDB database server to support your Keystone app, then supply the address of that server to your app.

We can help you with MongoDB-specific issues (such as performance questions, queries, etc.), but for operational questions, generally you may find more expertise and faster response on Keystone mailing list other ops-focused Q/A websites such as ServerFault.

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages