-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-start.sh
More file actions
executable file
Β·42 lines (34 loc) Β· 905 Bytes
/
dev-start.sh
File metadata and controls
executable file
Β·42 lines (34 loc) Β· 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Start development servers for django-blocknote
echo "π Starting django-blocknote development servers..."
# Function to handle cleanup
cleanup() {
echo ""
echo "π Stopping development servers..."
kill $(jobs -p) 2>/dev/null
exit 0
}
# Set up signal handling
trap cleanup SIGINT SIGTERM
# Start Vite in watch mode
echo "π¦ Starting Vite build watcher..."
cd frontend
npm run watch &
VITE_PID=$!
cd ..
# Wait a moment for Vite to start
sleep 2
# Start Django development server
echo "π Starting Django development server..."
cd examples/demo_project
python manage.py runserver &
DJANGO_PID=$!
cd ../..
echo ""
echo "β
Development servers started!"
echo "π Django app: http://127.0.0.1:8000"
echo "π Admin: http://127.0.0.1:8000/admin (admin/admin)"
echo ""
echo "Press Ctrl+C to stop both servers"
# Wait for both processes
wait $VITE_PID $DJANGO_PID