Deploying an Effect Platform App with Hono on AWS Lambda
Hello! I'm just getting started with effect platform and the HttpApi. I'm deploying my app to aws-lambda like this, I'm using Hono because it has the aws-lambda adapter, does it make sense?
import { Layer } from "effect";
import { ContentApiLive } from "../public/live/api";
import { HttpApiBuilder, HttpServer } from "@effect/platform";
import { Hono } from "hono";
import { handle } from "hono/aws-lambda";
const api = HttpApiBuilder.toWebHandler(
Layer.mergeAll(ContentApiLive, HttpServer.layerContext)
);
const app = new Hono().all("*", (c) => {
const request = c.req.raw;
console.log(request);
return api.handler(request);
});
export const handler = handle(app);