Re: Storing a Javascript function in a mongoDB database for retrieval later.

From: Adam Griffiths <adamfrederickgriffiths@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Mon, 9 May 2016 02:21:58 -0700 (PDT)
Why ads?


On Monday, 9 May 2016 10:11:48 UTC+1, Rhys Campbell wrote:

You can although MongoDB don't seem very keen to encourage it...


https://docs.mongodb.com/manual/tutorial/store-javascript-function-on-server/

I've already looked at this but it doesn't seem to work either, if I 
perform an identical operation but change the collection to system.js then 
I get the same error. 


If I pull code straight from the example in the page you linked and run it 
I instead get the following error

TypeError: Cannot read property 'js' of undefined
    at /home/ubuntu/workspace/test2.js:5:14
    at 
/home/ubuntu/workspace/node_modules/mongodb/lib/mongo_client.js:519:11
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

 

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/32eb7ccb-fbc5-4725-83e0-332e047755d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?