focus/run.sh

13 lines
484 B
Bash
Raw Permalink Normal View History

2024-01-10 00:39:55 +01:00
#!/bin/bash
2024-01-12 13:38:04 +01:00
PUBLIC_BACKEND_URL=${PUBLIC_BACKEND_URL:-http://localhost:3000}
PUBLIC_BACKEND_WSURL=${PUBLIC_BACKEND_WSURL:-${PUBLIC_BACKEND_URL/http:/ws:}}
PUBLIC_BACKEND_WSURL=${PUBLIC_BACKEND_WSURL/https:/wss:}
find frontend -type f -exec sed -i "s|http://localhost:3000|$PUBLIC_BACKEND_URL|g" {} +
find frontend -type f -exec sed -i "s|ws://localhost:3000|$PUBLIC_BACKEND_WSURL|g" {} +
2024-01-10 00:39:55 +01:00
cd frontend && npm run preview -- --port 4173 --host 0.0.0.0 &
cd backend && ./main &
wait -n