Skip to content

Commit bd81b97

Browse files
committed
fix semicolon consistency
Signed-off-by: Karthik Ganeshram <[email protected]>
1 parent b399b20 commit bd81b97

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
{%- case http-router -%}
2-
{% when "hono" %}
3-
// For Hono documentation refer to https://hono.dev/docs/
2+
{% when "hono" %}// For Hono documentation refer to https://hono.dev/docs/
43
import { Hono } from 'hono';
5-
import { fire } from "hono/service-worker"
4+
import { fire } from "hono/service-worker";
65
import { logger } from 'hono/logger';
76

87
let app = new Hono();
98

109
// Logging to stdout via built-in middleware
11-
app.use(logger())
10+
app.use(logger());
1211

1312
// Example of a custom middleware to set HTTP response header
1413
app.use(async (c, next) => {
15-
c.header('server', 'Spin CLI')
14+
c.header('server', 'Spin CLI');
1615
await next();
1716
})
1817

1918
app.get('/', (c) => c.text('Hello, Spin!'));
2019
app.get('/hello/:name', (c) => {
21-
return c.json({ message: `Hello, ${c.req.param('name')}` })
20+
return c.json({ message: `Hello, ${c.req.param('name')}` });
2221
});
2322

2423
fire(app);
@@ -45,7 +44,7 @@ function handle(_request) {
4544
headers: {
4645
'content-type': 'text/plain'
4746
}
48-
})
47+
});
4948
}
5049

5150
addEventListener('fetch', (event) => {

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
{%- case http-router -%}
2-
{% when "hono" %}
3-
// For Hono documentation refer to https://hono.dev/docs/
2+
{% when "hono" %}// For Hono documentation refer to https://hono.dev/docs/
43
import { Hono } from 'hono';
5-
import { fire } from "hono/service-worker"
6-
import type { Context, Next } from 'hono'
4+
import { fire } from "hono/service-worker";
5+
import type { Context, Next } from 'hono';
76
import { logger } from 'hono/logger';
87

98
let app = new Hono();
109

1110
// Logging to stdout via built-in middleware
12-
app.use(logger())
11+
app.use(logger());
1312

1413
// Example of a custom middleware to set HTTP response header
1514
app.use(async (c: Context, next: Next) => {
16-
c.header('server', 'Spin CLI')
15+
c.header('server', 'Spin CLI');
1716
await next();
1817
})
1918

2019
app.get('/', (c: Context) => c.text('Hello, Spin!'));
2120
app.get('/hello/:name', (c: Context) => {
22-
return c.json({ message: `Hello, ${c.req.param('name')}!` })
21+
return c.json({ message: `Hello, ${c.req.param('name')}!` });
2322
});
2423

2524
fire(app);
@@ -47,7 +46,7 @@ function handle(_request: Request): Response {
4746
headers: {
4847
'content-type': 'text/plain'
4948
}
50-
})
49+
});
5150
}
5251

5352
//@ts-ignore

0 commit comments

Comments
 (0)