Skip to content

Appstyx/mongo-driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo Driver for Fluent

Swift CircleCI Slack Status

Install Mongo

OS X

brew install mongodb

Ubuntu

sudo apt-get update
sudo apt-get install mongodb

Run

mongod

Use in Vapor

When setting up your droplet, create a database using a MongoDriver instance and pass it into the Droplet intializer.

let mongo = try MongoDriver(
	database: "test",
	user: "user1",
	password: "pswd1",
	host: "localhost",
	port: 27017
)
let db = Database(mongo)
let drop = Droplet(database: db)