import { createServer } from "node:http"
import { NodeHttpServer, NodeRuntime } from "@effect/platform-node"
import { Effect, Layer } from "effect"
import { ServerConfig } from "./config"
import { Server } from "./server"


Layer.launch(Server).pipe(
    Effect.provide(NodeHttpServer.layerConfig(createServer, { port: ServerConfig.httpPort })),
    NodeRuntime.runMain,
)
