From f750966952202cb525d77e2c898f5875ce60d8ab Mon Sep 17 00:00:00 2001 From: MikeHughes-BIN Date: Thu, 18 Dec 2025 22:55:26 +0100 Subject: [PATCH] Add start scripts for Windows and Unix environments that checks if node is installed, installs dependencys and starts the programm --- start.bat | 23 +++++++++++++++++++++++ start.sh | 15 +++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 start.bat create mode 100755 start.sh diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..b215b6a --- /dev/null +++ b/start.bat @@ -0,0 +1,23 @@ +@echo off +cd /d %~dp0 + +:: Prüfen ob Node.js installiert ist +where node >nul 2>nul +if %errorlevel% neq 0 ( + echo Node.js ist nicht installiert. + pause + exit /b 1 +) + +echo Node.js gefunden: +node -v + +npm install +if %errorlevel% neq 0 ( + echo npm install fehlgeschlagen. + pause + exit /b 1 +) + +npm start +pause \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..d83ac83 --- /dev/null +++ b/start.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Prüfen ob Node.js installiert ist +if ! command -v node >/dev/null 2>&1; then + echo "Node.js ist nicht installiert." + exit 1 +fi + +echo "Node.js gefunden: $(node -v)" + +# Abhängigkeiten installieren +npm install || exit 1 + +# Projekt starten +npm start \ No newline at end of file