addPerlApi
Method
interface IDistributedApplicationBuilder { // ... omitted for brevity addPerlApi( resourceName: string, appDirectory: string, scriptName: string): PerlAppResource;}Signature
method
addPerlApi builderAdds 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): PerlAppResourceParameters
resourceName stringThe name of the resource.appDirectory stringThe 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).scriptName stringThe API script path, relative to `appDirectory`. Do not include the `appDirectory` prefix — the script is resolved relative to `appDirectory` automatically.Returns
PerlAppResource Applies to
This method applies to the following types: