File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,22 @@ class ParseServer {
83
83
// Note: Tests will start to fail if any validation happens after this is called.
84
84
databaseController
85
85
. performInitialization ( )
86
- . then ( ( ) => hooksController . load ( ) )
86
+ . then ( async ( ) => await hooksController . load ( ) )
87
87
. then ( ( ) => {
88
+ if ( cloud ) {
89
+ addParseCloud ( ) ;
90
+ if ( typeof cloud === 'function' ) {
91
+ cloud ( Parse ) ;
92
+ } else if ( typeof cloud === 'string' ) {
93
+ require ( path . resolve ( process . cwd ( ) , cloud ) ) ;
94
+ } else {
95
+ throw "argument 'cloud' must either be a string or a function" ;
96
+ }
97
+ }
98
+ } )
99
+ . then ( async ( ) => {
88
100
if ( serverStartComplete ) {
89
- serverStartComplete ( ) ;
101
+ await serverStartComplete ( ) ;
90
102
}
91
103
} )
92
104
. catch ( error => {
@@ -98,17 +110,6 @@ class ParseServer {
98
110
}
99
111
} ) ;
100
112
101
- if ( cloud ) {
102
- addParseCloud ( ) ;
103
- if ( typeof cloud === 'function' ) {
104
- cloud ( Parse ) ;
105
- } else if ( typeof cloud === 'string' ) {
106
- require ( path . resolve ( process . cwd ( ) , cloud ) ) ;
107
- } else {
108
- throw "argument 'cloud' must either be a string or a function" ;
109
- }
110
- }
111
-
112
113
if ( security && security . enableCheck && security . enableCheckLog ) {
113
114
new CheckRunner ( options . security ) . run ( ) ;
114
115
}
You can’t perform that action at this time.
0 commit comments