Skip to content

bgahagan/scalajs-lambda.g8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala.js AWS Lambda Template

A Giter8 template for creating an AWS Lambda using Scala.js.

sbt new bgahagan/scalajs-lambda.g8

Features

Development

Watch for changes and re-compile (from sbt):

> ~fastOptJS::webpack

Running locally

You can use docker-lambda to test the function locally:

$ docker run --rm \
    -v $(pwd)/target/scala-2.13/scalajs-bundler/main:/var/task:ro,delegated \
    lambci/lambda:nodejs12.x \
    lambda-fastopt-bundle.handler \
    '{"body":"world"}'

The handler name will be ${project-name}-fastopt-bundle.handler.

Deploy

Package the lambda (from sbt):

> universal:packageBin

Deploy the resulting zip in target/universal to AWS Lambda. The handler name will be ${project-name}.handler.

Template license

Written in 2020 by Bryan Gahagan

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this template to the public domain worldwide. This template is distributed without any warranty. See https://creativecommons.org/publicdomain/zero/1.0/.

About

Scala.js AWS Lambda Template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published