Windows Service is the another preferred deployment method for production servers. Again, steps to setup and configure HyperServer in Service mode has many common steps with other deployment methods.
First step is to copy file hyper_service.exe and hyper_service.cfg to your application folder.
Next step is to install the service. You may also rename hyper_service.exe. If you want to run several instance of HyperServer service then it is better to give a unique name to each service exe file. Don't forget that for each service executable no need a CFG file with same name.
In order to install service open a commad line window with administrative rights.
In order command line prompt use below command to install your service.
hyper_service.exe /install <ServiceName>
Parameter <ServiceName> will be used a generate a custom service name for this service instance. HyperServer will add HyperService in front of your provided service name.
hyper_service.exe /install myapp
This command will install a Windows Service with name HyperService_myapp.
Uninstalling service is also simple.
hyper_service.exe /uninstall myapp
Make sure you specify same <ServiceName> you've specified during installing the service.
Before starting the service make sure you have made necessary changes in service CFG file. In order to quickly test your service you only need to set binary_name=<yourapp.exe> and start your newly installed service.
As always make sure your node application EXE is compiled as standalone server.