Skip to content

Commit

Permalink
Fix code examples (#882)
Browse files Browse the repository at this point in the history
* Fix code examples

* Fix code examples
  • Loading branch information
rojvv authored Jul 27, 2023
1 parent 982e875 commit 33f793b
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions site/docs/es/hosting/fly.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { bot } from "./bot.ts";
const port = 8000;
const handleUpdate = webhookCallback(bot, "std/http");
Deno.serve(async (req) => {
Deno.serve({ port }, async (req) => {
const url = new URL(req.url);
if (req.method === "POST" && url.pathname.slice(1) === bot.token) {
try {
Expand All @@ -38,7 +38,7 @@ Deno.serve(async (req) => {
}
}
return new Response();
}, { port });
});
```

```ts{10} [Node.js]
Expand Down
1 change: 1 addition & 0 deletions site/docs/es/hosting/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Deno.serve(async (req) => {
} catch (err) {
console.error(err);
}
return new Response();
});
```
Expand Down
4 changes: 2 additions & 2 deletions site/docs/hosting/fly.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { bot } from "./bot.ts";
const port = 8000;
const handleUpdate = webhookCallback(bot, "std/http");
Deno.serve(async (req) => {
Deno.serve({ port }, async (req) => {
const url = new URL(req.url);
if (req.method === "POST" && url.pathname.slice(1) === bot.token) {
try {
Expand All @@ -38,7 +38,7 @@ Deno.serve(async (req) => {
}
}
return new Response();
}, { port });
});
```

```ts{10} [Node.js]
Expand Down
1 change: 1 addition & 0 deletions site/docs/hosting/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Deno.serve(async (req) => {
} catch (err) {
console.error(err);
}
return new Response();
});
```

Expand Down
4 changes: 2 additions & 2 deletions site/docs/id/hosting/fly.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { bot } from "./bot.ts";
const port = 8000;
const handleUpdate = webhookCallback(bot, "std/http");
Deno.serve(async (req) => {
Deno.serve({ port }, async (req) => {
const url = new URL(req.url);
if (req.method === "POST" && url.pathname.slice(1) === bot.token) {
try {
Expand All @@ -38,7 +38,7 @@ Deno.serve(async (req) => {
}
}
return new Response();
}, { port });
});
```

```ts{10} [Node.js]
Expand Down
1 change: 1 addition & 0 deletions site/docs/id/hosting/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Deno.serve(async (req) => {
} catch (err) {
console.error(err);
}
return new Response();
});
```

Expand Down
4 changes: 2 additions & 2 deletions site/docs/uk/hosting/fly.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { bot } from "./bot.ts";
const port = 8000;
const handleUpdate = webhookCallback(bot, "std/http");
Deno.serve(async (req) => {
Deno.serve({ port }, async (req) => {
const url = new URL(req.url);
if (req.method === "POST" && url.pathname.slice(1) === bot.token) {
try {
Expand All @@ -38,7 +38,7 @@ Deno.serve(async (req) => {
}
}
return new Response();
}, { port });
});
```

```ts{10} [Node.js]
Expand Down
1 change: 1 addition & 0 deletions site/docs/uk/hosting/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Deno.serve(async (req) => {
} catch (err) {
console.error(err);
}
return new Response();
});
```

Expand Down
4 changes: 2 additions & 2 deletions site/docs/zh/hosting/fly.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { bot } from "./bot.ts";
const port = 8000;
const handleUpdate = webhookCallback(bot, "std/http");
Deno.serve(async (req) => {
Deno.serve({ port }, async (req) => {
const url = new URL(req.url);
if (req.method === "POST" && url.pathname.slice(1) === bot.token) {
try {
Expand All @@ -38,7 +38,7 @@ Deno.serve(async (req) => {
}
}
return new Response();
}, { port });
});
```

```ts{10} [Node.js]
Expand Down
1 change: 1 addition & 0 deletions site/docs/zh/hosting/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Deno.serve(async (req) => {
} catch (err) {
console.error(err);
}
return new Response();
});
```

Expand Down

0 comments on commit 33f793b

Please sign in to comment.