I want to load lodash while db scripting in RoboMongo's shell.
I've tried doing load('lodash.min.js')
in my db script, but the shell doesn't see the library. The db script and the library are in the same directory.
What I did as a workaround for now, was to set the absolute path for loading the library.
load('/absolute/path/to/the/library/');
In order to find the current directory of the shell just run pwd()
on the robo3t Shell
And use the path to place your external script, this will let you just put the script file name in the load('script.js')
instead of the entire absolute path.