const usersGroupLive = HttpApiBuilder.group(api, "users", (handlers) =>
handlers.handle("getUser", (req) =>
Effect.succeed({
id: req.path.id,
name: "John Doe",
createdAt: DateTime.unsafeNow()
})
)
).pipe(
// Provide the Logger middleware to the group
Layer.provide(LoggerLive)
)
const usersGroupLive = HttpApiBuilder.group(api, "users", (handlers) =>
handlers.handle("getUser", (req) =>
Effect.succeed({
id: req.path.id,
name: "John Doe",
createdAt: DateTime.unsafeNow()
})
)
).pipe(
// Provide the Logger middleware to the group
Layer.provide(LoggerLive)
)