Skip to content

Commit

Permalink
add bash script to manage Svelte and Django apps
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimraimi committed Apr 10, 2024
1 parent e7a16d4 commit 130b468
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
1 change: 0 additions & 1 deletion scripts/init.sh

This file was deleted.

25 changes: 25 additions & 0 deletions scripts/install_dependencies.sh
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
26 changes: 26 additions & 0 deletions scripts/start_servers.sh
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

0 comments on commit 130b468

Please sign in to comment.