Function downloadDbs

  • Updates the local copy of the selected GeoLite databases, downloading new files if needed, or performing checksum validation of exiting ones.

    Parameters

    • Optionaloptions: {
          dbList: GeoIpDbName[];
          path: string;
      }

      Configuration options.

      • dbList: GeoIpDbName[]

        The list of databases to download. You can find available databases in the GeoIpDbName enum or use string names directly in JS. Defaults to downloading all the databases.

      • path: string

        The path to the directory where the databases will be downloaded and stored. Defaults to ./node_modules/node-geolite2-redist/dbs.

    Returns Promise<void>

    A Promise that resolves when the databases have been successfully downloaded, and rejects otherwise.