• Fetches the port for a given spin service and port environment variable.

    Parameters

    • service: string

      The name of the spin service to fetch the port for.

    • portEnvName: string

      The name of the environment variable to fetch the port from.

    • basePath: string = '/run'

      The base path to look for the port file.

    Returns Promise<number | undefined>

    The port number or undefined if the port could not be found.