ArangoDB 3.12 Product Release Announcement! Read the blog for details. Read Blog

Vector-5

Be more lazy, use a custom .arangod.rc

Estimated reading time: 1 minutes

How often did you typed

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:

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).

Picture of Ingo Friepoertner
April 10, 2015 ,

Ingo is dealing with all the good ideas from the ArangoDB community, customers and industry experts to improve the value provided by the company’s native multi-model approach. In former positions he worked as a product owner and tech consultant, building custom software solutions for large companies in various industries. Ingo holds a diploma in business informatics from FHDW University of Applied Sciences.

Leave a Comment