Cloud Function using Firestore to store user feedback.
David Hodge
Use Google Cloud Functions Emulator
npm install --save --save-exact @google-cloud/firestore
npm install -g @google-cloud/functions-framework
export GOOGLE_APPLICATION_CREDENTIALS=/Users/myname/.cred/myserviceaccount.json
functions-framework --target=feedback
Run locally with Functions Framework
curl --header "Content-Type: application/json" \
--request POST \
--data '{"usappid":"APPID", "user":"USER", "feedback":"FEEDBACK"}' \
http://localhost:8080
Manual Deployment
gcloud functions deploy feedback --trigger-http --runtime=nodejs10 --region=us-east1
Automated CI/CD See cloudbuild.yaml