forked from manifoldmarkets/manifold
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·32 lines (28 loc) · 732 Bytes
/
dev.sh
File metadata and controls
executable file
·32 lines (28 loc) · 732 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
#!/bin/bash
ENV=${1:-dev}
DEBUG=${2:-false}
case $ENV in
dev)
FIREBASE_PROJECT=dev
NEXT_ENV=DEV ;;
prod)
FIREBASE_PROJECT=prod
NEXT_ENV=PROD ;;
*)
echo "Invalid environment; must be dev or prod."
exit 1
esac
firebase use $FIREBASE_PROJECT
API_COMMAND="dev"
if [ "$DEBUG" = "true" ]; then
API_COMMAND="debug"
fi
npx concurrently \
-n API,NEXT,TS \
-c white,magenta,cyan \
"cross-env NEXT_PUBLIC_FIREBASE_ENV=${NEXT_ENV} \
yarn --cwd=backend/api $API_COMMAND" \
"cross-env NEXT_PUBLIC_API_URL=localhost:8088 \
NEXT_PUBLIC_FIREBASE_ENV=${NEXT_ENV} \
yarn --cwd=web serve" \
"cross-env yarn --cwd=web ts-watch"