addPerlApi

Method
📦 CommunityToolkit.Aspire.Hosting.Perl v13.6.1
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addPerlApi(
resourceName: string,
appDirectory: string,
scriptName: string): PerlAppResource;
}

Signature

methodaddPerlApibuilder
Adds a Perl API server resource (e.g., Mojolicious, Dancer2) to the application model. Passes the `daemon` subcommand so HTTP frameworks start a listener.
addPerlApi(
resourceName: string,
appDirectory: string,
scriptName: string): PerlAppResource
resourceNamestringThe name of the resource.
appDirectorystringThe path to the directory containing the Perl script. Resolved relative to the AppHost project directory; becomes the resource's working directory and the anchor for all relative path resolution (script path, `WithLocalLib`, cpanfile discovery).
scriptNamestringThe API script path, relative to `appDirectory`. Do not include the `appDirectory` prefix — the script is resolved relative to `appDirectory` automatically.
PerlAppResource

Applies to

This method applies to the following types: