PG→Mongo Ingest CLI - v1.0.0
    Preparing search index...

    Function getHubDb

    • Gets or creates a MongoDB database instance for the Hub database.

      This function provides convenient access to the Hub database instance. It uses the singleton client connection and returns the 'data' database which contains the message events.

      Returns Promise<Db>

      Promise resolving to the MongoDB database instance

      const db = await getHubDb();
      const collections = await db.listCollections().toArray();
      console.log('Available collections:', collections.map(c => c.name));