| 1 | import * as Schema from "effect/Schema"; |
| 2 | import * as HttpApi from "effect/http-api/HttpApi"; |
| 3 | import * as HttpApiEndpoint from "effect/http-api/HttpApiEndpoint"; |
| 4 | import * as HttpApiGroup from "effect/http-api/HttpApiGroup"; |
| 5 | |
| 6 | export class Greeting extends Schema.Class<Greeting>("Greeting")({ |
| 7 | message: Schema.String, |
| 8 | }) {} |
| 9 | |
| 10 | export const hello = HttpApiEndpoint.get("hello", "/", { |
| 11 | success: Greeting, |
| 12 | }); |
| 13 | |
| 14 | export class HelloGroup extends HttpApiGroup.make("Hello").add(hello) {} |
| 15 | |
| 16 | export class BackendApi extends HttpApi.make("BackendApi").add(HelloGroup) {} |