Note Please note that the command line options vary depending on the version. For example,
/Log
is unavailable in version 14.x.x.
This note is regarding how to install Prism CLI as a Windows service. Prism CLI has a mock command which takes an API document and creates a mock server from the API documentation. The mock server will run until the shell windows stay open. By installing Prism CLI as a Windows service, we can keep the service running in the background.
-
Install NSSM
> choco install nssm -y
-
Install Elasticsearch
Download Elasticsearch from Elastic - Download Elasticsearch. The download page includes the instructions for the installation process. After downloading, unzip the folder and run the elasticsearch.bat file inside the bin folder. To do this, you can open a PowerShell window and go to the Elasticsearch files folder and run
bin\elasticsearch.bat
. Port9200
is the default port for Elasticsearch. You can test if Elasticsearch is running by executingInvoke-RestMethod http://localhost:9200
command in PowerShell. This should return some data about the Elasticsearch instance. -
Install Kibana
Download Kibana from Elastic - Download Kibana. After downloading Kibana, unzip the folder and open the config/kibana.yml file. Goto the elasticsearch.hosts section in the kibana.yml file and uncomment the line. _**elasticsearch.hos