Execute script for mongo

194 Views Asked by At

I'd like to write some Mongo db scripts to update schema of my database while I change version of my program, developed in Go.

While I think I could write this scripts in Go, I'd like to produce them as script.js, since I think they will be even more readable and they will have to be unchanged once written.

How can I execute a script for Mongo via mongo-go-driver?

0

There are 0 best solutions below