t3-code-android-nightly/.repos/alchemy-effect/examples/aws-ec2/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

24 lines
766 B
TypeScript

import * as Alchemy from "alchemy";
import * as AWS from "alchemy/AWS";
import * as Output from "alchemy/Output";
import * as Effect from "effect/Effect";
import { NetworkLive } from "./src/Network.ts";
import Server from "./src/Server.ts";
export default Alchemy.Stack(
"AwsEc2Example",
{
providers: AWS.providers(),
state: Alchemy.localState(),
},
Effect.gen(function* () {
const instance = yield* Server;
return {
instanceId: instance.instanceId,
publicIpAddress: instance.publicIpAddress,
instanceUrl: Output.interpolate`http://${instance.publicIpAddress}:3000`,
enqueueExample: Output.interpolate`http://${instance.publicIpAddress}:3000/enqueue?message=hello`,
};
}).pipe(Effect.provide(NetworkLive)),
);