-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: JavaScript
-
None
-
Fully Compatible
-
Platforms F (01/29/16)
There has been several tickets about how to upload a working library to the server, like:
http://stackoverflow.com/questions/8418651/techniques-for-storing-libraries-in-mongodbs-system-js
Turns out this is automatically done in v8: it will always run code as it is loaded.
If you save:
db.system.js.save({ _id: "mylib", value: "myprint = function()
Then you can use myprint() freely in your code
With spidermonkey it is not done.
We should standardize and make it so that:
- by default code does not get run
- if there is a flag set on the object "run: true" then run it as it is installed on context.