@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 32 lines 883 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import { Stack } from "alchemy/Stack";
3 import * as Effect from "effect/Effect";
4 import * as HttpServerResponse from "effect/http/HttpServerResponse";
5
6 export class SandboxContainer extends Cloudflare.Container<SandboxContainer, {}>()(
7 "SandboxContainer",
8 ) {}
9
10 export const SandboxLive = /* @__PURE__ */ SandboxContainer.make(
11 Stack.useSync((stack) => ({
12 main: import.meta.url,
13 instanceType: stack.stage === "prod" ? "standard-1" : "dev",
14 env: {
15 GREETING: "hello-from-env",
16 },
17 observability: {
18 logs: {
19 enabled: true,
20 },
21 },
22 })),
23 Effect.gen(function* () {
24 return SandboxContainer.of({
25 fetch: Effect.succeed(
26 HttpServerResponse.text(`Hello from Sandbox container! GREETING=${process.env.GREETING}`),
27 ),
28 });
29 }),
30 );
31
32 export default SandboxLive;