Adding a Log Level to an HTTPApi
Hey there, how would one go about adding a log level to a HTTPApi? Thank you.
This is my implementation so far:
This is my implementation so far:
HttpApiBuilder.serve(HttpMiddleware.logger).pipe(
Layer.provide(NumberAliveApiImplementation),
Layer.provide(HttpApiBuilder.middlewareCors()),
HttpServer.withLogAddress,
Layer.provide(NodeHttpServer.layer(createServer, { port: 3000 })),
Layer.launch,
NodeRuntime.runMain,
);