How to load a js file to mongoDB
load(filename.js)
mongo localhost:27017/mydb myfile.js
print('From file 1');
load('myFileTwo.js'); // Load other js file .
myFileTwo.jsprint('From file 2');
MongoShell>mongo myFileOne.js
OutputFrom file 1
From file 2
Comments
Post a Comment