Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Created January 30, 2011 00:53
Show Gist options
  • Save tanepiper/802384 to your computer and use it in GitHub Desktop.
Save tanepiper/802384 to your computer and use it in GitHub Desktop.
module.exports = (settings) ->
cradle = require('cradle')
return new(cradle.Connection)(settings.database.host, settings.database.port, settings.database.options)
(function() {
module.exports = function(settings) {
var cradle;
cradle = require('cradle');
return new cradle.Connection(settings.database.host, settings.database.port, settings.database.options);
};
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment