1import { Function } from "@/Railway/Function.ts";
2import * as Effect from "effect/Effect";
3import * as HttpServerResponse from "effect/http/HttpServerResponse";
4import { Partition, Site } from "./suite-env.ts";
5
6export { 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 */
12export 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) {}