Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.33 KB

README.md

File metadata and controls

45 lines (26 loc) · 1.33 KB

The Full Stack Network logo

Hexagonal Architecture Cloud Function Example

References:

Summary:

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

Dependencies

  • 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

Run locally

Install deps

    npm install

Run locally

    npm start

Run Test

    npm test

Deploy to GCP

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.