We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b37f965 commit 83d73b8Copy full SHA for 83d73b8
index.js
@@ -5,12 +5,14 @@ var express = require('express');
5
var ParseServer = require('parse-server').ParseServer;
6
var http = require('http');
7
8
-if (!process.env.DATABASE_URI) {
+var databaseUri = process.env.DATABASE_URI || process.env.MONGOLAB_URI
9
+
10
+if (!databaseUri) {
11
console.log('DATABASE_URI not specified, falling back to localhost.');
12
}
13
14
var api = new ParseServer({
- databaseURI: process.env.DATABASE_URI || 'mongodb://localhost:27017/dev',
15
+ databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
16
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
17
appId: 'myAppId',
18
masterKey: 'myMasterKey'
0 commit comments