The Crystal Programming Language Forum

MongoDB client

Hello to all! I want to migrate some services I wrote in Node to Crystal. Is there a library to connect to MongoDB Atlas?

I tried several, but none of them worked. Is it because of the version?

Hi @krthr,

I published a new version of Cryomongo fixing some issues preventing connection to Atlas (I tried with MongoDB 4.2 & 4.4).

Could you check the new release? (just make sure to pick the url having the the mongodb:// scheme, not mongodb+srv://)

Hi! Thank you. It worked without +srv… I’m using Moongoon, but I’m having troubles with reference (populate in Mongoose)

Hi. I run in prod using datanoise/mongo.cr without any ORM stuff. It costs some boilerplate and effort, but nothing terrible. You could also consider one of its forks. Mine is marzhaev/mongo.cr, but there should better maintained ones.