#!/bin/bash
set -e

if test -z "$TMUX"; then
    exec tmux new-session "$0" "$@"
fi

cd $(dirname $0)/..

pip3 install -r requirements.txt

tmux new-window -n serve "cd api && ./manage.py runserver; $SHELL -i"
tmux split-window "cd web && npm run serve; $SHELL -i"
$SHELL -i
