feat: added script to setup proxy for local dev

This commit is contained in:
Gabriel Almeida 2023-03-20 11:41:27 -03:00
commit bd2f05996b
3 changed files with 24 additions and 2 deletions

10
src/frontend/set_proxy.sh Executable file
View 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