From 539e8d0832f7405ed3305ececcf0b1afdbc6a596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henry=20Sj=C3=B8en?= Date: Wed, 5 Jun 2024 13:39:08 +0200 Subject: [PATCH] script that one can double-click on a mac to start frontend and back-end Note, everything must be installed and setup first. --- start_app.command | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 start_app.command diff --git a/start_app.command b/start_app.command new file mode 100755 index 0000000..f5b9fe1 --- /dev/null +++ b/start_app.command @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Starting the application..." +DIR="$(dirname "$0")" + +# Open a new Terminal window and start the backend server +osascript -e 'tell app "Terminal" to do script "cd '"$DIR"'/backend && source venv/bin/activate && python server.py"' + +# Open a new Terminal window and start the frontend application +osascript -e 'tell app "Terminal" to do script "cd '"$DIR"'/frontend && npm run dev"'