Inspired by Luca Mezzalira and his article Developing Evolutionary Architecture with AWS Lambda I created a Google Cloud Platform version.
- Google Cloud Function instead of AWS Lambda
- Datastore instead of DynamoDB
- Gcloud SDK set locally and authorised
- GCP Project setup for deploying to
- GCP Datastore enable and containing stocks data. See adapters/StocksDAO.js
- API_KEY for currency api at http://data.fixer.io
Install deps
npm install
Run locally
npm start
npm test
gcloud functions deploy stocksGET --runtime [YOUR_RUNTIME] --trigger-http
- Replace
[YOUR_RUNTIME]
with the name of the runtime you are using. I.E. nodejs14
For a complete list, see the gcloud reference.