Using the --dev flag is the only support way to change the internal Kibana environment to something else. Allowing NODE_ENV to be set at all can have unexpected results with our dependencies, so we now always set it to production.
32 lines
514 B
Batchfile
32 lines
514 B
Batchfile
@echo off
|
|
|
|
SETLOCAL
|
|
|
|
set SCRIPT_DIR=%~dp0
|
|
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI
|
|
|
|
set NODE=%DIR%\node\node.exe
|
|
|
|
set NODE_ENV="production"
|
|
|
|
WHERE /Q node
|
|
IF %ERRORLEVEL% EQU 0 (
|
|
for /f "delims=" %%i in ('WHERE node') do set SYS_NODE=%%i
|
|
)
|
|
|
|
If Not Exist "%NODE%" (
|
|
IF Exist "%SYS_NODE%" (
|
|
set "NODE=%SYS_NODE%"
|
|
) else (
|
|
Echo unable to find usable node.js executable.
|
|
Exit /B 1
|
|
)
|
|
)
|
|
|
|
TITLE Kibana Server
|
|
"%NODE%" %NODE_OPTIONS% --no-warnings "%DIR%\src\cli_plugin" %*
|
|
|
|
:finally
|
|
|
|
ENDLOCAL
|