Skip to content

Commit

Permalink
Bind serverURL with mountPath
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjhih committed Apr 9, 2016
1 parent ec856e1 commit db86ba0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ if ((gcmId && gcmKey) || (productionPfx && productionBundleId) || (devBundleId &
};
}

var serverURL = process.env.SERVER_URL || 'http://localhost:1337/parse'; // Don't forget to change to https if needed
// Serve the Parse API on the /parse URL prefix
var mountPath = process.env.PARSE_MOUNT || '/parse';
var serverURL = process.env.SERVER_URL || 'http://localhost:1337' + mountPath; // Don't forget to change to https if needed

var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
Expand Down Expand Up @@ -95,8 +97,6 @@ if(process.env.TRUST_PROXY == 1) {
app.enable('trust proxy');
}

// Serve the Parse API on the /parse URL prefix
var mountPath = process.env.PARSE_MOUNT || '/parse';
app.use(mountPath, api);

// Parse Server plays nicely with the rest of your web routes
Expand Down

0 comments on commit db86ba0

Please sign in to comment.