Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Grails Configuration for MongoDB on AppFog (or Cloud Foundry)

View DataSource.groovy
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// You'll need configuration like this to get MongoDB up and running with Grails on AppFog
// This config will also work locally
 
grails {
def vcap = System.env.VCAP_SERVICES
def credentials = vcap ? grails.converters.JSON.parse(vcap)["mongodb-1.8"][0]["credentials"] : null
mongo {
host = credentials ? credentials.hostname : "localhost"
port = credentials ? credentials.port : "27017"
username = credentials ? credentials.username : null
password = credentials ? credentials.password : null
databaseName = credentials ? credentials.db : "your-localhost-db-name"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.