File tree 1 file changed +20
-18
lines changed 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,27 @@ 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 ( ) )
87
- . then ( ( ) => {
86
+ . then ( async ( ) => await hooksController . load ( ) )
87
+ . then ( async ( ) => {
88
88
if ( serverStartComplete ) {
89
- serverStartComplete ( ) ;
89
+ await serverStartComplete ( ) ;
90
+ }
91
+ } )
92
+ . then ( ( ) => {
93
+ if ( cloud ) {
94
+ addParseCloud ( ) ;
95
+ if ( typeof cloud === 'function' ) {
96
+ cloud ( Parse ) ;
97
+ } else if ( typeof cloud === 'string' ) {
98
+ require ( path . resolve ( process . cwd ( ) , cloud ) ) ;
99
+ } else {
100
+ throw "argument 'cloud' must either be a string or a function" ;
101
+ }
102
+ }
103
+ } )
104
+ . then ( ( ) => {
105
+ if ( security && security . enableCheck && security . enableCheckLog ) {
106
+ new CheckRunner ( options . security ) . run ( ) ;
90
107
}
91
108
} )
92
109
. catch ( error => {
@@ -97,21 +114,6 @@ class ParseServer {
97
114
process . exit ( 1 ) ;
98
115
}
99
116
} ) ;
100
-
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
- if ( security && security . enableCheck && security . enableCheckLog ) {
113
- new CheckRunner ( options . security ) . run ( ) ;
114
- }
115
117
}
116
118
117
119
get app ( ) {
You can’t perform that action at this time.
0 commit comments