Dheeraj
Dheeraj

Reputation: 556

Error writing shell script for mongo db automation

I am using mongo db for my dashboard project. Now I have the following four steps to be followed in a row:

  1. cd scripts

  2. node compiler.js

  3. type mongo and enter the mongodb

  4. type load('final_compiled.gen.js')

  5. 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

Answers (1)

user3612296
user3612296

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

Related Questions