import { } from "@effection-contrib/deno-deploy"Deno Deploy
Provides Deno Deploy Effection context with region, deploymentId and
isDenoDeploy flag to detect when running in the Deno Deploy environment. This
can be useful when testing an application that's deployed to Deno Deploy.
import { main } from "effection";
import { useDenoDeploy } from "@effection-contrib/deno-deploy";
await main(function* () {
const {
isDenoDeploy,
deploymentId,
region,
} = yield* useDenoDeploy();
});
API Reference
Properties
- isDenoDeploy: boolean
True when running in Deno Deploy
- deploymentId: string | undefined
ID of the current Deno Deploy environment
- region: string | undefined
It holds the region code of the region in which the deployment is running. You can use this variable to serve region-specific content. You can refer to the region code from the regions page.