Running Web APIs on Kestrel

As Kestrel is by default included and enabled in the PowerServer Web APIs, when the PowerServer Web APIs runs, it automatically runs on Kestrel.

You can run PowerServer Web APIs on Kestrel and as a service:

Step 1: Publish the PowerServer Web APIs from the SnapDevelop IDE to a folder by following instructions in this section.

The Web APIs will be compiled as an ASP.NET Core app and all files (such as configuration files, assembly files, dependencies, .NET runtime etc.) required to run the app will be copied to the publish folder.

Step 2: Copy all files from the publish folder to the server.

Alternatively, you can directly run the app using this command:

dotnet <app_assembly>.dll

Step 3: Run the PowerServer Web APIs as a service just like how you run any other ASP.NET Core app, so that it can be automatically run without needing you to log into the PC to start it.

To run the PowerServer Web APIs as a service in Windows, refer to https://docs.microsoft.com/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-3.1&tabs=visual-studio.

To run the PowerServer Web APIs as a service in Linux, refer to https://docs.microsoft.com/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1#create-the-service-file.