The best way to control Claude Code, Codex and more from any computer or phone

main
ts 18 lines 565 Bytes
Raw
1 import * as Fly from "@alchemy.run/fly";
2 import type { ServiceProps } from "@alchemy.run/fly/Service";
3 import * as pathe from "pathe";
4
5 /** Body served by `echo-server.ts`. */
6 export const ECHO_BODY = "fly-echo";
7
8 /**
9 * An external Service running `echo-server.ts` on port 3000. Set
10 * `env.ECHO_BODY` to change the response body.
11 */
12 export const Echo = (options: Partial<Omit<ServiceProps, "main">> = {}, id = "Echo") =>
13 Fly.Service(id, {
14 main: pathe.resolve(import.meta.dirname, "echo-server.ts"),
15 port: 3000,
16 region: "iad",
17 ...options,
18 });