delay in node js code example
Example 1: how to delay execution in nodejs
function sayHello() {
console.log("hello");
}
// calls the sayHello function after 1000 milisecends
setTimeout(sayHello, 1000);
Example 2: node scripts delay
"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",}