Skip to content

Commit b399b20

Browse files
committed
update hono templates to addres deprecation
Signed-off-by: Karthik Ganeshram <[email protected]>
1 parent 398a85c commit b399b20

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

templates/http-js/content/src/index.js.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{% when "hono" %}
33
// For Hono documentation refer to https://hono.dev/docs/
44
import { Hono } from 'hono';
5+
import { fire } from "hono/service-worker"
56
import { logger } from 'hono/logger';
67

78
let app = new Hono();
@@ -20,7 +21,7 @@ app.get('/hello/:name', (c) => {
2021
return c.json({ message: `Hello, ${c.req.param('name')}` })
2122
});
2223

23-
app.fire();
24+
fire(app);
2425
{% when "itty" %}
2526
// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
2627
import { AutoRouter } from 'itty-router';

templates/http-ts/content/src/index.ts.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{% when "hono" %}
33
// For Hono documentation refer to https://hono.dev/docs/
44
import { Hono } from 'hono';
5+
import { fire } from "hono/service-worker"
56
import type { Context, Next } from 'hono'
67
import { logger } from 'hono/logger';
78

@@ -21,7 +22,7 @@ app.get('/hello/:name', (c: Context) => {
2122
return c.json({ message: `Hello, ${c.req.param('name')}!` })
2223
});
2324

24-
app.fire();
25+
fire(app);
2526
{% when "itty" %}
2627
// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
2728
import { AutoRouter } from 'itty-router';

0 commit comments

Comments
 (0)