Is Readme uptodate?
jkmathew opened this issue · comments
Readme says after adding package, to follow code
import Vapor
import VaporMongo
let drop = Droplet()
try drop.addProvider(VaporMongo.Provider.self)
But its giving error for me. Saying that no such module 'VaporMongo'
My code that works is
import MongoProvider
let config = try Config()
try config.setup()
try config.addProvider(MongoProvider.Provider.self)
let drop = try Droplet(config)
Is anything wrong with my steps or should the read to be updated?
Also I had to add url
key in the mongo.json config file. That is not mentioned in readme. :(
You're correct, the actual current module is 'MongoProvider'. The mongo.json file also expects all of the config values to be passed in the 'url' field. I went ahead and submitted a pull request to reflect these changes.
Closing issue since readme updated in #19