Skip to content

Commit

Permalink
fix views
Browse files Browse the repository at this point in the history
  • Loading branch information
cloutier committed Mar 11, 2018
1 parent a25758e commit 6d087d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/picture.php
Expand Up @@ -23,7 +23,12 @@
use Cloutier\PhpIpfsApi\IPFS;
use MongoDB\Driver\Manager;

$mongo = new MongoDB\Client("mongodb://mongo:27017");
if (getenv('IPFSPICS_DB')) {
$mongo = new MongoDB\Client(getenv('IPFSPICS_DB'));
} else {
$mongo = new MongoDB\Client("mongodb://localhost:27017");
}

$db = $mongo->ipfspics;


Expand Down

0 comments on commit 6d087d2

Please sign in to comment.