jpsider/RestPS

restapi as a windows service

Lichtsinnig opened this issue · 3 comments

How do I run restapi as a windows service?

I use the service manager program (ssm.exe) included in SaltStack to do this:
cmd /c c:\salt\bin\ssm.exe install {service name} Powershell.exe {path to listener script}\Invoke-RestPSListener.ps1 -RoutesFilePath {path to routes script}\RestPS_Endpoints\Invoke-AvailableRouteSet.ps1 -Port 8081

ssm.exe includes a number of config flags, to set logging, restart options, run as user, etc. I can't locate the documentation at the moment, though.

Thanks @joel74 !!