Where to load Mongoid

I’m new to Jets. It looks awesome!

I’m trying to figure out where the best load the mongoid gem. I’m assuming that I want it to be in the Lambda Execution Context. I just don’t know where to run the following code.

Mongoid.load!(File.join(File.dirname(__FILE__), 'config', 'mongoid.yml'))


Thinking probably https://rubyonjets.com/docs/initializers/

Thanks! Do I need to run Jets.once in the script? Or is that handled by the process running the initializers?

No need to call Jets.once. :+1: