Edi Weissmann

I code for fun /* and profit */

Configuring a Play 2.0 App Using MongoDB Salat Plugin for Cloudfoundry

1
2
3
4
5
6
7
8
9
10
# comment out the existing configuration for local development
# mongodb.default.db = "mydb"

# add configuration that will use the VCAP_SERVICES environment variables from Cloudfoundry
# assumes that you have provisioned a mongodb service called 'mongodb-appname' for your app
mongodb.default.db = ${?cloud.services.mongodb-appname.connection.db}
mongodb.default.host = ${?cloud.services.mongodb-appname.connection.host}
mongodb.default.port = ${?cloud.services.mongodb-appname.connection.port}
mongodb.default.user = ${?cloud.services.mongodb-appname.connection.username}
mongodb.default.password = ${?cloud.services.mongodb-appname.connection.password}