A repository to test connection to cloud SQL DB without exposing them to public IP. Designed to help you to just run the code in your environment
- make sure to install node js. I'm using version in file
.nvmrc
- make sure to install all dependencies.
npm install
- for safer developer experience. please install gcloud cli https://cloud.google.com/sdk/docs/install
- copy
.env.example
to.env
cp .env.example .env
- make sure to copy your service account json file in
credentials
folder - setup the environment variable in
.env
. see guide in that file for reference - everything ready! just run
chmod +x cloud_sql_proxy
chmod +x deploy_to_local.sh
./deploy_to_local.sh
- make sure to practice the development in local guide first
- if you are sure, change your
ENV
variable toPROD
- run this
chmod +x deploy_to_cloud_run.sh
./deploy_to_cloud_run.sh
- if that command fails. check whether you have access to cloud run and cloud build (i assume you have)