2015-01-14 22:46:04 +01:00
|
|
|
module.exports = function (grunt) {
|
|
|
|
grunt.registerTask('kibana_server', function (keepalive) {
|
|
|
|
var done = this.async();
|
2015-05-12 01:35:07 +02:00
|
|
|
var kibana = require('../');
|
|
|
|
var devStatics = require('./utils/dev_statics');
|
|
|
|
var quiet = !grunt.option('debug') && !grunt.option('verbose');
|
|
|
|
var settings = { 'logging.quiet': quiet };
|
2015-01-21 19:16:14 +01:00
|
|
|
|
2015-05-12 01:35:07 +02:00
|
|
|
kibana.start(settings, [devStatics]).then(function (server) {
|
|
|
|
grunt.log.ok('Server started: ' + server.info.uri);
|
2015-01-14 22:46:04 +01:00
|
|
|
if (keepalive !== 'keepalive') done();
|
2015-05-12 01:35:07 +02:00
|
|
|
}).catch(done);
|
|
|
|
|
2015-01-14 22:46:04 +01:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|