File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ export default app
24
24
25
25
This means you can create API routes with Hono's syntax and use a lot of Hono's built-in middleware and third-party middleware.
26
26
27
+ > [ !WARNING]
28
+ >
29
+ > ` hono-remix-adapter ` is currently unstable. The API may be changed without announcement in the future.
30
+
27
31
## Install
28
32
29
33
``` bash
Original file line number Diff line number Diff line change 1
1
// server/index.ts
2
2
import { Hono } from 'hono'
3
+ import { poweredBy } from 'hono/powered-by'
3
4
4
- const app = new Hono < {
5
- Bindings : {
6
- MY_VAR : string
7
- }
8
- } > ( )
5
+ const app = new Hono ( )
9
6
10
- app . use ( async ( c , next ) => {
11
- await next ( )
12
- c . header ( 'X-Powered-By' , 'Remix and Hono' )
13
- } )
7
+ app . use ( poweredBy ( ) )
14
8
15
9
app . get ( '/api' , ( c ) => {
16
10
return c . json ( {
17
11
message : 'Hello' ,
18
- var : c . env . MY_VAR
19
12
} )
20
13
} )
21
14
You can’t perform that action at this time.
0 commit comments