File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,27 @@ class ParseServer {
8383 // Note: Tests will start to fail if any validation happens after this is called.
8484 databaseController
8585 . performInitialization ( )
86- . then ( ( ) => hooksController . load ( ) )
87- . then ( ( ) => {
86+ . then ( async ( ) => await hooksController . load ( ) )
87+ . then ( async ( ) => {
8888 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 ( ) ;
90107 }
91108 } )
92109 . catch ( error => {
@@ -97,21 +114,6 @@ class ParseServer {
97114 process . exit ( 1 ) ;
98115 }
99116 } ) ;
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- }
115117 }
116118
117119 get app ( ) {
You can’t perform that action at this time.
0 commit comments