@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 30 lines 711 Bytes
Raw
1 import * as Fly from "@alchemy.run/fly";
2 /**
3 * Fly.io Upstash Redis attached to an HTTP Service.
4 *
5 * Redis is not reachable from CI — the Service PING's it over 6PN
6 * and exposes `{ pong: true }` at `/`.
7 */
8 import * as Alchemy from "alchemy";
9 import * as Effect from "effect/Effect";
10 import Api from "./src/api.ts";
11 import { Cache } from "./src/shared.ts";
12
13 export default Alchemy.Stack(
14 "FlyRedis",
15 {
16 providers: Fly.providers(),
17 state: Alchemy.localState(),
18 },
19 Effect.gen(function* () {
20 const cache = yield* Cache;
21 const api = yield* Api;
22
23 return {
24 appName: api.appName,
25 redisId: cache.redisId,
26 redisName: cache.name,
27 apiUrl: api.url,
28 };
29 }),
30 );