Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 833 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 833 Bytes

To create a Google Cloud Function, use the TobiasRoland/scalajs-gcp-cloud-functions.g8 template

sbt new TobiasRoland/scalajs-gcp-cloud-functions.g8

Scala.js example app for GCP Cloud Functions

This is an example 'Hello World' app in Scala that will run on Google Cloud Platform's Cloud Functions and respond to any HTTP requests with status code 200 and a plaintext body of Hello World.

Read more: GCP Cloud Functions with Scala.js in 10 lines(ish)

To build

sbt fullOptJS

This will generate a single JS file: ./task/scala-2.12/scalajs-gcp-cloud-function-opt.js, where the helloWorld function can be invoked from GCP Cloud Functions