Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.87 KB

README.md

File metadata and controls

62 lines (40 loc) · 1.87 KB

Generate Smithy4s code on the fly

Modules

Backend

Full stack Scala application with a Scalajs frontend. Depends on Frontend. This application is built on on top of Smithy4s and is deployed as a Docker container on fly.io.

Live at: https://morning-bird-7081.fly.dev/

Deployed on a very small 2vcpu and 512mb vm.

Configuration

The backend can be configured.

  1. SMITHY_CLASSPATH_CONFIG: location of a json file used to load dependencies to include during code gen. The file content looks like this:
{
  "entries": {
    "com.disneystreaming.alloy:alloy-core:0.2.8": "/opt/docker/smithy-classpath/alloy-core-0.2.8.jar"
  }
}

Frontend

ScalaJS application shipped in Backend.

Developement

It is recomended that you have 3 long running proccesses to develop this application:

  1. backend: sbt ~backend/reStart
  2. cd into modules/frontend and run npm i && npm run dev
  3. frontend scalajs: sbt "~frontend/fastLinkJS"

Dockerhub

The images are pushed to the docker hub so you can deploy them on your own infrastructure.

  • latest: daddykotex/smithy4s-code-generation:latest
  • latest: daddykotex/smithy4s-code-generation:with-dependencies
  • daddykotex/smithy4s-code-generation:$SHA
  • daddykotex/smithy4s-code-generation:with-dependencies-$SHA

Fly.io

The images are pushed to the fly.io registry so that it can be deployed quickly from there.

Use the following command to use the right version of flyctl via nix: nix-shell -p flyctl -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/555bd32eb477d657e133ad14a5f99ac685bfdd61.tar.gz