t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/Fly/fixtures/echo.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

21 lines
550 B
TypeScript

import * as Fly from "@/Fly";
import type { ServiceProps } from "@/Fly/Service";
import * as pathe from "pathe";
/** Body served by `echo-server.ts`. */
export const ECHO_BODY = "fly-echo";
/**
* An external Service running `echo-server.ts` on port 3000. Set
* `env.ECHO_BODY` to change the response body.
*/
export const Echo = (
options: Partial<Omit<ServiceProps, "main">> = {},
id = "Echo",
) =>
Fly.Service(id, {
main: pathe.resolve(import.meta.dirname, "echo-server.ts"),
port: 3000,
region: "iad",
...options,
});