node.js - How to load some JavaScript file in node-mongodb-native? -



node.js - How to load some JavaScript file in node-mongodb-native? -

i utilize node-mongodb-native in project , need load javascript file custom functions in next tutorial

my code connecting database looks following:

var mongoclient = new mongoclient(new server('localhost', 27017, { socketoptions: {keepalive: 1} , auto_reconnect: true , poolsize: 10 }), { native_parser: true , w:1 }); mongoclient.open(function (err, mongoclient) { if (err) homecoming callback(err); var db = mongoclient.db('test'); console.log('database connect success!'); // ... application code });

i need load underscore.js file mongodb possible utilize functions within server-side functions saved using db.system.js.save

i can't find way of doing that. please help me.

node.js mongodb node-mongodb-native

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -