How often did you typed
1 2 |
var db = require("internal").db; |
in the arangod
console?
If you are familiar with the arangosh
JavasScript shell than you probably use a custom .arangosh.rc
startup script in your home-directory which defines your own extra variables and functions that you need often.
Now we’ve also added support for a file .arangod.rc
that will be executed on server start. For example, you could put the following into the .arangod.rc
file:
1 2 3 4 5 6 7 8 9 10 11 |
internal = require("internal"); fs = require("fs"); db = internal.db; time = internal.time; timed = function (cb) { var s = time(); cb(); return time() - s; }; print = internal.print; |
You’ll never have to go through the history again to add your favourite function again. (Available in devel-branch, coming to the next releases soon).