For details visit : https://premaseem.wordpress.com/2016/...
There are times when we need to save the steps or commands of mongo shell and need to get it executed in the same order (for reusability and automation and avoid errors). The best solution is to save it in a file with any extension preferred is js, however I call it as mjs which means mongo javascript.
TIP : To be effective while writing query, you write commands using IDE to use auto complete, formatting, Json format verification and then redirect input to mongo
En esta página del sitio puede ver el video en línea MongoDb Tutorial 5 - How to load JavaScript and use Mongo Scripts de Duración hora minuto segunda en buena calidad , que subió el usuario Prem Aseem Jain 22 enero 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 9,504 veces y le gustó 28 a los espectadores. Disfruta viendo!