@distilled.cloud/cloudflare
v1.0.0-rc.16
Published
Keywords
Readme
@distilled.cloud/cloudflare
Effect-native SDK for cloudflare.
Installation
npm install @distilled.cloud/cloudflare effectQuick start
import { Effect, Layer } from "effect";
import * as FetchHttpClient from "effect/http/FetchHttpClient";
import * as Cloudflare from "@distilled.cloud/cloudflare";
const program = Effect.gen(function* () {
const result = yield* Cloudflare.workers.getScript({
account_id: "account",
script_name: "api",
});
return result;
});
const Live = Layer.mergeAll(
FetchHttpClient.layer,
Cloudflare.CredentialsFromEnv,
Cloudflare.CloudflareProtocol,
);
program.pipe(Effect.provide(Live), Effect.runPromise);Auth
Required: CLOUDFLARE_API_KEY, CLOUDFLARE_EMAIL. Sent as Authorization: Bearer.
