@pluv/platform-cloudflare v0.17.3
Disclaimer: This package is currently in preview and may have breaking changes between versions. Please wait for a
v1.0.0
stable release before using this in production.
@pluv/platform-cloudflare
Enables @pluv/io to run on Cloudflare Workers.
👉 See full documentation on pluv.io. 👈
Installation
# npm
npm install @pluv/platform-cloudflare
# yarn
yarn add @pluv/platform-cloudflare
# pnpm
pnpm add @pluv/platform-cloudflare
Basic Example
import { createIO } from "@pluv/io";
import { platformCloudflare } from "@pluv/platform-cloudflare";
export const io = createIO({
platform: platformCloudflare(),
});
/* Somewhere in a Cloudflare worker durable object */
const { 0: client, 1: server } = new WebSocketPair();
await io.register(server);
return new Response(null, { status: 101, webSocket: client });
Reference
Check us out on GitHub for more information on how to use @pluv/io
.
24 days ago
25 days ago
25 days ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
5 months ago
5 months ago
5 months ago
9 months ago
9 months ago
8 months ago
8 months ago
9 months ago
7 months ago
9 months ago
6 months ago
5 months ago
9 months ago
10 months ago
10 months ago
12 months ago
12 months ago
12 months ago
1 year ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago