Accessing Container APIs After compose.up
To access the APIs
of your containers after running compose.up
, make sure to set the apis
parameter to true
. This will include the apis
object in the result, where each container’s id
is mapped to its api
from the start function.
Example
Notes
- Ensure that the
apis
parameter is set totrue
to retrieve theapis
object. - Each key in
result.apis
corresponds to theid
of a container, and the value is theapi
defined in that container’sstart
function. - Important: The keys in
apis
are always optional because, at the type level, we cannot determine if a container has transitioned to thedone
status.