Skip to content

Commit 7fea7d8

Browse files
committed
Merge branch 'pr-migrations'
2 parents a78aec6 + 9a0ffd4 commit 7fea7d8

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

src/ParseServer.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,26 @@ class ParseServer {
9090
if (schema) {
9191
await new DefinedSchemas(schema, this.config).execute();
9292
}
93+
})
94+
.then(async () => {
9395
if (serverStartComplete) {
94-
serverStartComplete();
96+
await serverStartComplete();
97+
}
98+
})
99+
.then(() => {
100+
if (cloud) {
101+
addParseCloud();
102+
if (typeof cloud === 'function') {
103+
cloud(Parse);
104+
} else if (typeof cloud === 'string') {
105+
require(path.resolve(process.cwd(), cloud));
106+
} else {
107+
throw "argument 'cloud' must either be a string or a function";
108+
}
109+
}
110+
111+
if (security && security.enableCheck && security.enableCheckLog) {
112+
new CheckRunner(options.security).run();
95113
}
96114
})
97115
.catch(error => {
@@ -102,21 +120,6 @@ class ParseServer {
102120
process.exit(1);
103121
}
104122
});
105-
106-
if (cloud) {
107-
addParseCloud();
108-
if (typeof cloud === 'function') {
109-
cloud(Parse);
110-
} else if (typeof cloud === 'string') {
111-
require(path.resolve(process.cwd(), cloud));
112-
} else {
113-
throw "argument 'cloud' must either be a string or a function";
114-
}
115-
}
116-
117-
if (security && security.enableCheck && security.enableCheckLog) {
118-
new CheckRunner(options.security).run();
119-
}
120123
}
121124

122125
get app() {

0 commit comments

Comments
 (0)