| 1 | import { Function } from "@/Railway/Function.ts"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as HttpServerResponse from "effect/http/HttpServerResponse"; |
| 4 | import { Partition, Site } from "./suite-env.ts"; |
| 5 | |
| 6 | export { Site }; |
| 7 | |
| 8 | /** |
| 9 | * Effect-native Railway.Function: bundled into a single file and |
| 10 | * deployed as a canvas Function. No Docker. No registry. |
| 11 | */ |
| 12 | export default class Ping extends Function<Ping>()( |
| 13 | "Ping", |
| 14 | { |
| 15 | project: Site, |
| 16 | environment: Partition, |
| 17 | main: import.meta.url, |
| 18 | }, |
| 19 | Effect.gen(function* () { |
| 20 | return { |
| 21 | fetch: Effect.succeed(HttpServerResponse.text("ok")), |
| 22 | }; |
| 23 | }), |
| 24 | ) {} |