Mongodb Classroom image

Anil  Bist / Professional / DataBase

To post your Question Join Classroom
Lesson Topics's No:-  ||
Lessons:- Execution of a JavaScript file in MongoDB

Execution of a JavaScript file in MongoDB

./ mongo  localhost:27017 /mydb myjsfile. js



This operation executes the  myjsfile.js   script in a mongo shell that connects to the  mydb database on the  mongod  instance accessible via the localhost interface  on port  27017. localhost:27017  is not mandatory as this is the default port mongodb uses.

Also, you can run a .js file from within  mongo console.

>load ( "myjsfile.js" )
Anil  Bist

Skills    Mongodb

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,India

I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a


  Students (0)