Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 469 Bytes
var repl = require('repl'),
Elastic = require('./lib/engine'),
instance = new Elastic();
var replServer = repl.start({
prompt: 'directory > '
});
replServer.context.ElasticSearch = Elastic;
replServer.context.elasticSearch = instance;
replServer.context.deleteByEndpoint = instance.deleteByEndpoint.bind(instance);
replServer.context.deleteIndex = instance.deleteIndex.bind(instance);
replServer.context.deleteById = instance.deleteById.bind(instance);