33 lines
937 B
Bash
Executable File
33 lines
937 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Development mode - starts servers in separate terminals
|
|
# Requires tmux or you can use separate terminal tabs
|
|
|
|
echo "🎭 Starting Storyteller RPG in Development Mode..."
|
|
echo ""
|
|
|
|
# Check if tmux is available
|
|
if command -v tmux &> /dev/null; then
|
|
echo "Using tmux for split terminals..."
|
|
|
|
# Create a new tmux session
|
|
tmux new-session -d -s storyteller
|
|
|
|
# Split the window
|
|
tmux split-window -h -t storyteller
|
|
|
|
# Run backend in left pane
|
|
tmux send-keys -t storyteller:0.0 'source .venv/bin/activate && python main.py' C-m
|
|
|
|
# Run frontend in right pane
|
|
tmux send-keys -t storyteller:0.1 'cd frontend && npm start' C-m
|
|
|
|
# Attach to the session
|
|
tmux attach -t storyteller
|
|
else
|
|
echo "tmux not found. Please install tmux or run servers in separate terminals:"
|
|
echo ""
|
|
echo "Terminal 1: python main.py"
|
|
echo "Terminal 2: cd frontend && npm start"
|
|
fi
|