Skip to content

Home > @opengovsg/testcontainers > getRedisUrl

getRedisUrl() function ​

Build a redis://host:port URL from container info. Defaults to the mapped host port; pass internal: true for the container-internal address (localhost:6379) used by commands run inside the container.

Signature:

typescript
getRedisUrl: (container: ContainerInformation, options?: {
    internal?: boolean;
}) => string

Parameters ​

ParameterTypeDescription
containerContainerInformation
options{ internal?: boolean; }(Optional)

Returns:

string