Skip to content

Instantly share code, notes, and snippets.

View jasonmccay's full-sized avatar
🏠
Working from home

Jason McCay jasonmccay

🏠
Working from home
View GitHub Profile
development:
# Configure available database sessions. (required)
sessions:
# Defines the default session. (required)
default:
# Defines the name of the default database that Mongoid can connect to.
# (required).
database: the_guide_development
# Provides the hosts the default session can connect to. Must be an array
# of host:port pairs. (required)
@jasonmccay
jasonmccay / mongohq.php
Created August 21, 2012 09:47 — forked from coderoshi/mongohq.php
MongoHQ PHP Connection
<!-- PHP Mongo Docs: http://php.net/manual/en/class.mongodb.php -->
<html>
<body>
<h1>MongoHQ Test</h1>
<?php
try {
// connect to MongoHQ assuming your MONGOHQ_URL environment
// variable contains the connection string
$connection_url = getenv("MONGOHQ_URL");