Skip to content

Commit

Permalink
fix(readme): imports
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan authored Dec 6, 2024
1 parent 7d48097 commit 696d120
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default app;
**Channels** instances reflect particular features (e.g, chat room, notifications, etc.) and are responsible for handling incoming commands and subscription lifecycle events:

```js
import { Channel, ChannelHandle } from "@/lib/anycable";
import { Channel, ChannelHandle } from "@anycable/serverless-js";
// We re-using the identifiers type from the cable application
import type { CableIdentifiers } from "../cable";

Expand Down Expand Up @@ -233,7 +233,7 @@ Define [Vercel](https://vercel.com) serverless functions as follows:
```js
// api/anycable/connect/route.ts
import { NextResponse } from "next/server";
import { connectHandler, Status } from "@/lib/anycable";
import { connectHandler, Status } from "@anycable/serverless-js";
import app from "../../cable";

export async function POST(request: Request) {
Expand All @@ -253,7 +253,7 @@ export async function POST(request: Request) {

// api/anycable/command/route.ts
import { NextResponse } from "next/server";
import { commandHandler, Status } from "@/lib/anycable";
import { commandHandler, Status } from "@anycable/serverless-js";
import app from "../../cable";

export async function POST(request: Request) {
Expand All @@ -273,7 +273,7 @@ export async function POST(request: Request) {

// api/anycable/disconnect/route.ts
import { NextResponse } from "next/server";
import { disconnectHandler, Status } from "@/lib/anycable";
import { disconnectHandler, Status } from "@anycable/serverless-js";
import app from "../../cable";

export async function POST(request: Request) {
Expand Down Expand Up @@ -316,7 +316,7 @@ And then you can use the following handler:
```js
// api/anycable/route.ts
import { NextResponse } from "next/server";
import { handler, Status } from "@/lib/anycable";
import { handler, Status } from "@anycable/serverless-js";
import app from "../../cable";

export async function POST(request: Request) {
Expand Down

0 comments on commit 696d120

Please sign in to comment.