Reputation: 556
I am using mongo db for my dashboard project. Now I have the following four steps to be followed in a row:
cd scripts
node compiler.js
type mongo and enter the mongodb
type load('final_compiled.gen.js')
call mongo_function()
I am able to follow til step 4 using the script. but I am unable to call mongo_function() using the script which is running in the mongo db context. Can anyone help me in doing this.Thank You......
Upvotes: 1
Views: 78
Reputation: 108
You can do it easily. first you have to enter all the commands that you want to run in mongoDb context into javascript file and you will have to write a shell script which just loads that javascript file into the mongo context.
Upvotes: 1