Skip to content
DocsTry Aspire
DocsTry

withStaticFiles

Method
📦 Aspire.Hosting.Yarp v13.4.0
interface YarpResource {
// ... omitted for brevity
withStaticFiles(sourcePath?: string): YarpResource;
}

Signature

methodwithStaticFilesbuilder
Enables static file serving in the YARP resource.
withStaticFiles(sourcePath?: string): YarpResource
sourcePathstringoptional
YarpResource

Applies to

This method applies to the following types: