Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Created May 18, 2012 03:35
Show Gist options
  • Save michaeltwofish/2723011 to your computer and use it in GitHub Desktop.
Save michaeltwofish/2723011 to your computer and use it in GitHub Desktop.
// Set the default connection based on the environment
Connections::add('default', array(
'development' => array(
'type' => 'MongoDb',
'host' => '127.0.0.1',
'database' => 'schools',
),
'test' => array(
'type' => 'MongoDb',
'host' => '10.10.20.4',
'database' => 'schools',
),
'production' => array(
'type' => 'MongoDb',
'host' => 'mongo.example.com',
'database' => 'schools',
)
));
// Set the test connection based on the environment
Connections::add('test', array(
'development' => array(
'type' => 'MongoDb',
'host' => '127.0.0.1',
'database' => 'schools_test',
),
'test' => array(
'type' => 'MongoDb',
'host' => '10.10.20.4',
'database' => 'schools_test',
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment