Hi, 
  I am having the js file stored in the /var/lib/mongodb/sever.js. The 
server.js file has some predefined functions like below.

db.system.js.save({
    _id: "abs",
    value: function() {
      xxxx;
    }
});

How can I load these file like load("/var/lib/mongodb/server.js") from the 
node js mongo db driver?

db.eval("function(){ load('/var/lib/mongodb/server.js'); }", function(err, 
result) {
        console.log("The result of db creation ::::::::::::::::::::::::", 
result);
        console.log("The error on db creation :::::::::::::::::::::::", 
err);
        deferred.resolve(true);
    });

I tried the above method but i am getting error as "load not defined". Is 
there any way to achieve this?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/1db40187-3555-4fcb-abc3-f5f3db54357e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to