t3-code-android-nightly/.repos/alchemy-effect/examples/monorepo-single-stack/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

28 lines
751 B
TypeScript

import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Effect from "effect/Effect";
import { Path } from "effect/Path";
import Service from "./backend/src/Service.ts";
export default Alchemy.Stack(
"Monorepo",
{
providers: Cloudflare.providers(),
state: Cloudflare.state(),
},
Effect.gen(function* () {
const backend = yield* Service;
const path = yield* Path;
const website = yield* Cloudflare.Website.Vite("Website", {
rootDir: path.resolve(import.meta.dirname, "frontend"),
env: {
VITE_API_URL: backend.url.as<string>(),
},
});
return {
backendUrl: backend.url.as<string>(),
websiteUrl: website.url.as<string>(),
};
}),
);