Expose
@klotho::expose
The expose capability provides the ability to make your application accessible through an API endpoint.
Exposed objects will be mapped through routes to execution units, to make your executable code be able to receive requests and send responses to the end user. The mapped routes depend upon the implementation within the application's source code. Klotho will analyze your code to identify the routes you've defined in whichever supported framework you use
Directive | Type | Description |
---|---|---|
id | string | (Required) The exposed endpoint's id. Changing this results in a new endpoint (URL). |
target | string | (Required) Must be set and the only allowed value is "public" |
Configuration
Expose resources can be further configured within the Klotho configuration.
The configuration depends upon the provider which is specified in your klotho compilation. Example type configurations
Providers
- AWS
- GCP
Creates an API Gateway.
caution
GCP hasn't been updated to v1 yet, so this is just a projection of what it may be.
Creates an API Gateway.