From 6f401c12e30fc9bc9bf2afab5a2e8eddfa288563 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 3 Jun 2015 15:16:30 -0700 Subject: [PATCH] Parameterize Kibana port --- tasks/kibana_server.js | 3 +++ tasks/maybe_start_kibana.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/kibana_server.js b/tasks/kibana_server.js index d5c4de90d014a..1cfd1cdd998e5 100644 --- a/tasks/kibana_server.js +++ b/tasks/kibana_server.js @@ -3,6 +3,9 @@ module.exports = function (grunt) { var done = this.async(); var config = require('../src/server/config'); config.quiet = !grunt.option('debug') && !grunt.option('verbose'); + if (grunt.option('port')) { + config.port = config.kibana.port = grunt.option('port'); + } var server = require('../src/server'); server.start(function (err) { diff --git a/tasks/maybe_start_kibana.js b/tasks/maybe_start_kibana.js index 0df71d27d0c03..f473473f237cc 100644 --- a/tasks/maybe_start_kibana.js +++ b/tasks/maybe_start_kibana.js @@ -55,7 +55,7 @@ module.exports = function (grunt) { grunt.registerTask('maybe_start_kibana', maybeStartServer({ name: 'kibana-server', - port: config.kibana.port, + port: grunt.option('port') || config.kibana.port, tasks: ['kibana_server'] })); };