Skip to content

mstepanov/queues-mongodb-driver

Repository files navigation

A MongoDB driver for Vapor Queues

Getting Started

To install queues-mongo-driver add the following dependency to your Package.swift:

.package(url: "https://github.com/mstepanov/queues-mongodb-driver.git", from: "1.0.0"),

This driver depends on MongoSwift so to configure the driver we need an instance of a MongoDatabase. Ideally during app startup or in your configure.swift:

import QueuesMongoDriver
import MongoSwift

func configure(app: Application) async throws {
  let mongoClient = try MongoClient("mongodb://localhost:27017/", using: app.eventLoopGroup)
  try await app.queues.use(.mongodb(mongoClient.db("my-database")))
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages