File size: 952 Bytes
9bbddc7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8cbe088
 
 
 
 
9bbddc7
 
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
#!/bin/bash
run_convex_command() {
    npx convex "$@" --admin-key 0135d8598650f8f5cb0f30c34ec2e2bb62793bc28717c8eb6fb577996d50be5f4281b59181095065c5d0f86a2c31ddbe9b597ec62b47ded69782cd --url "http://0.0.0.0:3210"
}

./convex-local-backend &
run_convex_command env set LLM_API_KEY $HF_TOKEN &
run_convex_command dev --run init --until-success &
run_convex_command deploy &

# run_convex_command dev --run init --until-success &
# run_convex_command dev --tail-logs &
# you need to set VITE_CONVEX_URL to the Vite Server proxied version
if [ -z "$SPACE_HOST" ]; then
    export VITE_CONVEX_URL=http://localhost:5173/backend.convex.cloud
else
    export VITE_CONVEX_URL=https://$SPACE_HOST/backend.convex.cloud
fi

export VITE_OAUTH_CLIENT_ID=$OAUTH_CLIENT_ID
export OAUTH_CLIENT_SECRET=$OAUTH_CLIENT_SECRET
export OAUTH_SCOPES=$OAUTH_SCOPES
export OPENID_PROVIDER_URL=$OPENID_PROVIDER_URL

npm run dev:frontend -- --host 0.0.0.0 &
run_convex_command dev