Check out example codes for "node scripts delay". It will help you in understanding the concepts better.

Code Example 1

"scripts": {  "test:system": "npm-run-all build -p -r serve test",  "build": "webpack",  "serve": "serve -p 8000",  "test": "wait-on http://localhost:8001 && npm run test:codecept",  "test:codecept": "codecept",}

Learn ReactJs, React Native from akashmittal.com