forked from Frostyknob/wiki
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
Β·43 lines (34 loc) Β· 1.25 KB
/
Copy pathdev.sh
File metadata and controls
executable file
Β·43 lines (34 loc) Β· 1.25 KB
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
43
#!/bin/bash
# Start local development environment
set -e
echo "π Starting Peptide Wiki development environment..."
# Start Supabase if not running
if ! supabase status 2>/dev/null | grep -q "API URL"; then
echo "π¦ Starting Supabase..."
supabase start
fi
# Get Supabase credentials from status
echo "π Fetching Supabase credentials..."
API_URL=$(supabase status | grep "API URL" | awk '{print $3}')
ANON_KEY=$(supabase status | grep "Publishable key" | awk '{print $3}')
SERVICE_KEY=$(supabase status | grep "Secret key" | awk '{print $3}')
# Update .env.local with current values
echo "π Updating .env.local..."
cat > .env.local << EOF
# Supabase Configuration (Local Development)
# Auto-generated by dev.sh - do not edit manually
PUBLIC_SUPABASE_URL=${API_URL}
PUBLIC_SUPABASE_ANON_KEY=${ANON_KEY}
SECRET_SUPABASE_SERVICE_KEY=${SERVICE_KEY}
# reCAPTCHA v3 (skipped on localhost)
PUBLIC_RECAPTCHA_SITE_KEY=6Lca5CgsAAAAABCKRhDlmMAfd_CzqnOoorqq4xaY
SECRET_RECAPTCHA_SECRET_KEY=6Lca5CgsAAAAAE4Q3rRO1e3Lxb0bQrP2YMSOeJTQ
EOF
echo ""
echo "β
Supabase running:"
echo " API: ${API_URL}"
echo " Studio: $(supabase status | grep 'Studio URL' | awk '{print $3}')"
echo ""
# Start the dev server
echo "π Starting SvelteKit dev server..."
exec pnpm dev