include mongodb
- boxen
- homebrew
- stdlib
Once installed, you can access the following variables in your environment, projects, etc:
- BOXEN_MONGODB_PORT: the configured mongodb port
- BOXEN_MONGODB_URL: the URL for mongodb, including localhost & port
For the ruby client:
@client = Mongo::MongoClient.new('localhost', ENV['BOXEN_MONGODB_PORT'] || 27017)
For mongomapper's config/mongo.yml
:
development:
uri: <%= ENV['BOXEN_MONGODB_URL'] || 'mongodb://localhost:27017/' %>