How to build MongoDB Connection URI?

I see here that you can include MongoDB in the CircleCI builds, but in order to connect to it programmatically from my Node.js application (via Mongoose), I’ll need a connection URI / credentials + host + rest of details to build one. Also-

  • Will each build use a new database or one with existing data?
  • If I’m running 2 concurrent builds, do I get 2 separate databases (just thinking about race conditions with data creation/deletion)?

I look forward to hearing back. Thanks in advance!

2 Likes

I am looking for the same information - whats the connection URI to mongo?

Maybe this mongodb://localhost:27017/myproject

Any luck with this? I got stuck on this and can’t seem to find an answer anywhere.

1 Like