Skip to content

Commit 9cc7bd0

Browse files
committed
Merge pull request #751 from ParsePlatform/flovilmart.hotfixCLI
Fix error preventing starting parse-server from CLI with a config file
2 parents 4fe670e + a0150a7 commit 9cc7bd0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/cli/parse-server.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ if (program.args.length > 0 ) {
4242
console.log(`Configuation loaded from ${jsonPath}`)
4343
}
4444

45-
if (!program.appId || !program.masterKey || !program.serverURL) {
46-
program.outputHelp();
47-
console.error("");
48-
console.error(colors.red("ERROR: appId, masterKey and serverURL are required"));
49-
console.error("");
50-
process.exit(1);
51-
}
52-
5345
options = Object.keys(definitions).reduce(function (options, key) {
5446
if (program[key]) {
5547
options[key] = program[key];
@@ -61,6 +53,14 @@ if (!options.serverURL) {
6153
options.serverURL = `http://localhost:${options.port}${options.mountPath}`;
6254
}
6355

56+
if (!options.appId || !options.masterKey || !options.serverURL) {
57+
program.outputHelp();
58+
console.error("");
59+
console.error(colors.red("ERROR: appId, masterKey and serverURL are required"));
60+
console.error("");
61+
process.exit(1);
62+
}
63+
6464
const app = express();
6565
const api = new ParseServer(options);
6666
app.use(options.mountPath, api);

0 commit comments

Comments
 (0)