-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·34 lines (26 loc) · 794 Bytes
/
setup.sh
File metadata and controls
executable file
·34 lines (26 loc) · 794 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
#!/usr/bin/env bash
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$PROJECT_ROOT"
if [ ! -f .env ]; then
echo "[+] .env does not exist. Creating now..."
cp .env.example .env
JWT_SECRET="$(openssl rand -hex 32)"
sed -i "s/super-secret-jwt-token-with-at-least-32-characters-long/$JWT_SECRET/g" .env
fi
set -a
source .env
set +a
echo "[+] Installing backend dependencies..."
cd backend
uv sync
cd ..
echo "[+] Installing frontend dependencies..."
cd frontend
npm install
cd ..
echo "[+] Generating schema..."
cd backend
uv run ephaptic generate src.app:ephaptic -o ../frontend/src/lib/schema.d.ts --lang ts
# don't watch for first setup
echo "[+] Setup complete! Run ./dev.sh to start, and ./watchers.dev.sh to watch for schema changes."