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
Nesta página do site você pode assistir ao vídeo on-line MongoDb Tutorial 5 - How to load JavaScript and use Mongo Scripts duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Prem Aseem Jain 22 Janeiro 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 9,504 vezes e gostou 28 espectadores. Boa visualização!