Initial version (#1)
All checks were successful
Build / build (push) Successful in 41s
Lint / lint (push) Successful in 13s

Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2025-09-18 01:26:10 +02:00
parent ab2fff9a9f
commit c0cac90a66
47 changed files with 1633 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { NodeContext, NodeHttpServer, NodeRuntime } from "@effect/platform-node"
import { Effect, Layer } from "effect"
import { createServer } from "node:http"
import { ServerConfig } from "./config"
import { Server } from "./server"
Layer.launch(Server).pipe(
Effect.provide(Layer.empty.pipe(
Layer.provideMerge(ServerConfig.httpPort.pipe(
Effect.map(port => NodeHttpServer.layer(createServer, { port })),
Layer.unwrapEffect,
)),
Layer.provideMerge(NodeContext.layer),
)),
NodeRuntime.runMain,
)