Overhaul run.sh scripts

- Default environment variables through this, instead of .env
- Added some basic checks to ensure developers don't stub their toe
- Use `railway link`, injecting environment variables without insecure dotenv files
This commit is contained in:
2024-11-01 01:03:56 -05:00
parent f034b41da1
commit 5390fb57a7
2 changed files with 67 additions and 1 deletions
+7
View File
@@ -1,3 +1,10 @@
#!/usr/bin/env bash
# Check whether CWD is 'frontend'
if [ "$(basename "$(pwd)")" != "frontend" ]; then
echo "error: This script must be run from the 'frontend' directory."
exit 1
fi
export VITE_BACKEND_TARGET=${VITE_BACKEND_TARGET:-localhost:8000}
pnpm run dev