Created
June 30, 2015 11:05
-
-
Save oreillyross/00542d41e2adfe34c98b to your computer and use it in GitHub Desktop.
This object helps to simplify the interactions with a MongoDB database.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.casbah.MongoCollection | |
import com.mongodb.casbah.MongoConnection | |
object MongoFactory { | |
private val SERVER = "localhost" | |
private val PORT = 27017 | |
private val DATABASE = "portfolio" | |
private val COLLECTION = "stocks" | |
val connection = MongoConnection(SERVER) | |
val collection = connection(DATABASE)(COLLECTION) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment