Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithStaticFiles

Method
📦 Aspire.Hosting.Yarp v17.0.0
func (YarpResource) WithStaticFiles(options ...*WithStaticFilesOptions) YarpResource

Signature

methodWithStaticFilesbuilder
Enables static file serving in the YARP resource.
WithStaticFiles(options ...*WithStaticFilesOptions) YarpResource
options...*WithStaticFilesOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithStaticFilesOptions argument.

SourcePath*string
YarpResource

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: