Applications are the top level object that groups routes together to create an API.
When creating or updating an app, you can pass in a map of config variables.
config
is a map of values passed to the route runtime in the form of
environment variables.
Note: Route level configuration overrides app level configuration.
fn apps create --config k1=v1 --config k2=v2 myapp
Or using a cURL:
curl -H "Content-Type: application/json" -X POST -d '{
"app": {
"name":"myapp-curl",
"config": {
"k1": "v1",
"k2": "v2"
}
}
}' http://localhost:8080/v1/apps
App names are immutable. When doing PUT
calls, keep in mind that although you
are able to update an app's configuration set, you cannot really rename it.