File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff 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 ( ) {
You can’t perform that action at this time.
0 commit comments