The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as Cloudflare from "@alchemy.run/cloudflare"; |
| 2 | import * as Alchemy from "alchemy"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import Api from "./Api.ts"; |
| 5 | |
| 6 | // #region show |
| 7 | export default Alchemy.Stack( |
| 8 | "Shorty", |
| 9 | { |
| 10 | providers: Cloudflare.providers(), |
| 11 | state: Cloudflare.state(), |
| 12 | }, |
| 13 | Effect.gen(function* () { |
| 14 | const api = yield* Api; |
| 15 | // #region web |
| 16 | const web = yield* Cloudflare.Website.Vite("Web", { |
| 17 | // #region env |
| 18 | env: { VITE_API_URL: api.url.as<string>() }, |
| 19 | // #endregion env |
| 20 | }); |
| 21 | // #endregion web |
| 22 | // #region returnApi |
| 23 | return { api: api.url.as<string>() }; |
| 24 | // #endregion returnApi |
| 25 | // #region returnWeb |
| 26 | return { api: api.url.as<string>(), web: web.url }; |
| 27 | // #endregion returnWeb |
| 28 | }), |
| 29 | ); |
| 30 | // #endregion show |