From 3faf647000233b4715e12c3611e960a034682217 Mon Sep 17 00:00:00 2001 From: sahilsekr42 Date: Wed, 19 Feb 2025 17:10:01 +0530 Subject: [PATCH] added wait time for better experience following quick-start guide --- src/routes/docs/quick-starts/node/+page.markdoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/docs/quick-starts/node/+page.markdoc b/src/routes/docs/quick-starts/node/+page.markdoc index 7736aec238..ab01bc9632 100644 --- a/src/routes/docs/quick-starts/node/+page.markdoc +++ b/src/routes/docs/quick-starts/node/+page.markdoc @@ -189,10 +189,15 @@ async function getTodos() { console.log(`Title: ${todo.title}\nDescription: ${todo.description}\nIs Todo Complete: ${todo.isComplete}\n\n`); }); } +function sleep(time) { + return new Promise(resolve => setTimeout(resolve, time)); +} async function runAllTasks() { await prepareDatabase(); + await sleep(2500); await seedDatabase(); + await sleep(2000); await getTodos(); } runAllTasks(); @@ -204,4 +209,4 @@ runAllTasks(); Run your project with `node app.js` and view the response in your console. -{% /section %} \ No newline at end of file +{% /section %}