Swiftpack.co - Package - neallester/danake-mongo


A Mongo DB Accessor for the danake-sw persistence framework. Currently tested on OSX and Ubuntu 16.04.


  1. Install the MongoDb C Driver (on Ubuntu 16.04 it appears necessary to install the latest version from tarball rather than using the version available through apt-get).
  2. Add the following your project's Package.swift package description:
    .Package(url: "https://github.com/neallester/danake-mongo.git, .branch("master")),


import danakeMongo

let logger = ConsoleLogger()
let mongoAccessor = try MongoAccessor(dbConnectionString: "connectionString", databaseName: "dbName", logger: logger)

The mongoAccessor object may be used to create a Danake Framework Database (see danake-sw for details).

See class MongoAccessor for additional initialization options.

Important Note: Call MongoSwift.cleanup() exactly once at end of application execution.


Stars: 0
Help us keep the lights on

Used By

Total: 0