From f9dac6247a5f5c8d47c2dce68b0dc9c6ada45277 Mon Sep 17 00:00:00 2001 From: Chigozirim Igweamaka Date: Fri, 17 May 2024 11:55:53 +0100 Subject: [PATCH] Create applicationStart.sh --- scripts/applicationStart.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/applicationStart.sh diff --git a/scripts/applicationStart.sh b/scripts/applicationStart.sh new file mode 100644 index 0000000..ce320ce --- /dev/null +++ b/scripts/applicationStart.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +start_backend() { + go build -tags netgo -ldflags '-s -w' -o app + nohup ./app > backend.log 2>&1 & + echo "Backend started successfully." +} + +start_client() { + cd /client + nvm use 16 + npm run build + nohup serve -s build > client.log 2>&1 & + echo "Client started successfully." +} + +start_backend && start_client