clowder-framework / CONSORT-frontend

custom react frontend working with consort clowder instance
0 stars 0 forks source link

Stop starting server when app build fails #72

Open minump opened 10 months ago

minump commented 10 months ago

On npm start, the react client app builds first and then starts the express server. Even if the react client app build fails, the express server is started. Stop if the react client app build fails. In the webpack config run (https://github.com/clowder-framework/CONSORT-frontend/blob/main/tools/build.js#L16), when there is build errors, it returns a 1 or returns the errors. However this return is not captured in the npm start command (https://github.com/clowder-framework/CONSORT-frontend/blob/main/package.json#L14) . The commands for react client build and express server start should be separated out and the express server start should be triggered only after successful client build.