-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bash script to manage Svelte and Django apps
- Loading branch information
1 parent
e7a16d4
commit 130b468
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Function to install dependencies for SvelteKit | ||
install_svelte_dependencies() { | ||
echo "Installing dependencies for SvelteKit..." | ||
cd app/frontend | ||
npm install | ||
} | ||
|
||
# Function to install dependencies for Django app | ||
install_django_dependencies() { | ||
echo "Installing dependencies for Django app..." | ||
cd app/server | ||
pip3 install -r requirements.txt | ||
} | ||
|
||
# Function to install dependencies for both SvelteKit and Django apps | ||
install_dependencies() { | ||
install_svelte_dependencies | ||
install_django_dependencies | ||
} | ||
|
||
# Main script | ||
echo "Installing dependencies for SvelteKit and Django apps..." | ||
install_dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Function to start Svelte development server | ||
start_svelte() { | ||
echo "Starting Svelte development server..." | ||
cd app/frontend | ||
npm run dev | ||
} | ||
|
||
# Function to start Django app | ||
start_django() { | ||
echo "Starting Django app..." | ||
cd app/server | ||
python3 manage.py runserver | ||
} | ||
|
||
# Function to run both servers | ||
start_servers() { | ||
start_svelte & | ||
start_django & | ||
wait | ||
} | ||
|
||
# Main script | ||
echo "Starting Svelte and Django servers..." | ||
start_servers |