feat: added script to setup proxy for local dev
This commit is contained in:
parent
e3fe259ce2
commit
bd2f05996b
3 changed files with 24 additions and 2 deletions
10
src/frontend/set_proxy.sh
Executable file
10
src/frontend/set_proxy.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/bash
|
||||
# Edit package.json to set proxy
|
||||
backend_url=$BACKEND_URL
|
||||
echo "Setting proxy to $backend_url"
|
||||
# Load package.json file and edit proxy
|
||||
packagejson=$(cat package.json)
|
||||
|
||||
packagejson=$(echo "$packagejson" | jq ".proxy = \"$backend_url\"")
|
||||
|
||||
echo "$packagejson" > package.json
|
||||
Loading…
Add table
Add a link
Reference in a new issue