| 1 | import * as Alchemy from "alchemy"; |
| 2 | import * as Cloudflare from "alchemy/Cloudflare"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import Api from "./src/Api.ts"; |
| 5 | |
| 6 | export default Alchemy.Stack( |
| 7 | "CloudflareDurableObjectSqlExample", |
| 8 | { |
| 9 | providers: Cloudflare.providers(), |
| 10 | state: Alchemy.localState(), |
| 11 | }, |
| 12 | Effect.gen(function* () { |
| 13 | const api = yield* Api; |
| 14 | return { url: api.url.as<string>() }; |
| 15 | }), |
| 16 | ); |