A runtime agnostic http library for effect-ts
import*asHttpfrom"@effect-http/core"import*asHttpNodefrom"@effect-http/node"import{Effect,pipe}from"effect"import{createServer}from"node:http"constapp=pipe(Http.router.route("GET","/",Effect.succeed(Http.response.text("Hello world!"))).toHttpApp(),Http.httpApp.catchTag("RouteNotFound",()=>Effect.succeed(response.text("Not found",{status: 404})),),)pipe(app,HttpNode.serve(()=>createServer(),{port: 3000}),Effect.runFork,)import*asHttpfrom"@effect-http/core"import*asHttpBunfrom"@effect-http/bun"import{Effect,pipe}from"effect"constapp=pipe(Http.router.route("GET","/",Effect.succeed(Http.response.text("Hello world!"))).toHttpApp(),Http.httpApp.catchTag("RouteNotFound",()=>Effect.succeed(Http.response.text("Not found",{status: 404})),),)pipe(app,HttpBun.serve({port: 3000}),Effect.runFork)