From 2f01570c4ed7c56423ac00a3bfab36209f82052e Mon Sep 17 00:00:00 2001 From: Jan Keromnes Date: Wed, 3 Feb 2021 16:49:43 +0000 Subject: [PATCH] Introduce a 5s delay before opening the preview to give the server time to be ready --- .gitpod.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 826ca4a9..238ffca5 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -2,11 +2,12 @@ tasks: - init: npm install command: | export CLIENT_URL="$(gp url 35729)/livereload.js?snipver=1&port=443" + { gp await-port 5000 && sleep 5 && gp preview $(gp url 5000) & } &> /dev/null gp open src/App.svelte npm run dev ports: - port: 5000 - onOpen: open-preview + onOpen: ignore - port: 35729 onOpen: ignore vscode: