t3-code-android-nightly/.repos/alchemy-effect/examples/monorepo-multi-stack/frontend/alchemy.run.ts
Julius Marminge 108e01746c
Upgrade Effect and Alchemy betas (#4643)
Prepare Relay production infrastructure for the PlanetScale PS_20 HA topology, upgrade Effect and Alchemy to compatible betas, reconcile migration state, and preserve patched MCP session termination behavior.\n\nCo-authored-by: codex <codex@users.noreply.github.com>
2026-07-27 16:21:02 +02:00

26 lines
616 B
TypeScript

import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import { Backend } from "@monorepo-multi-stack/backend";
import * as Effect from "effect/Effect";
export default Alchemy.Stack(
"Frontend",
{
providers: Cloudflare.providers(),
state: Cloudflare.state(),
},
Effect.gen(function* () {
// reference the prod stage of the backend
const backend = yield* Backend;
const website = yield* Cloudflare.Website.Vite("Website", {
env: {
VITE_API_URL: backend.url,
},
});
return {
url: website.url.as<string>(),
};
}),
);