mongodb-memory-server-core
    Preparing search index...

    Function tryPort

    • Try a given port.

      Parameters

      • port: number

        The port to try

      • Optionalhost: string

        The address to bind the probe to, empty for the wildcard address

      Returns Promise<number>

      the port if successful, "-1" in case of EADDRINUSE, all other errors reject

      The error given if the code is not "EADDRINUSE"