@@ -19,8 +19,9 @@ const devtools = initDevframe(myDevframe, { base: '/__my-tool/' })
1919::: code-group
2020
2121``` ts [Vite]
22+ // vite.config.ts
23+ // connect-style middleware + Vite's own server for the socket
2224import { initDevframe } from ' devframe/initiate'
23- // vite.config.ts — connect-style middleware + Vite's own server for the socket
2425import { defineConfig } from ' vite'
2526import myDevframe from ' ./devframe'
2627
@@ -40,7 +41,8 @@ export default defineConfig({
4041```
4142
4243``` ts [Nitro]
43- // routes/__my-tool/[...path].ts — plus routes/__my-tool/index.ts (same body)
44+ // routes/__my-tool/[...path].ts
45+ // routes/__my-tool/index.ts
4446// for the namespace root, since a catch-all doesn't match its own empty path.
4547import { defineHandler } from ' nitro'
4648import { devtools } from ' ../../devtools'
@@ -49,7 +51,8 @@ export default defineHandler(event => devtools.handler(event.req))
4951```
5052
5153``` ts [Hono]
52- // server.ts — `serve()` hands back the node server the socket rides on
54+ // server.ts
55+ // `serve()` hands back the node server the socket rides on
5356import { serve } from ' @hono/node-server'
5457import { Hono } from ' hono'
5558import { devtools } from ' ./devtools'
@@ -60,9 +63,9 @@ devtools.attach(serve({ fetch: app.fetch, port: 3000 }))
6063```
6164
6265``` ts [Next.js]
66+ // app/%5F_my-tool/[[...path]]/route.ts
67+ // Next reserves `_`-prefixed folders, so the segment is URL-encoded (`%5F_` decodes to `__`).
6368import { initDevframe } from ' devframe/initiate'
64- // app/%5F_my-tool/[[...path]]/route.ts — Next reserves `_`-prefixed
65- // folders, so the segment is URL-encoded (`%5F_` decodes to `__`).
6669import myDevframe from ' @/devframe'
6770
6871export const runtime = ' nodejs'
0 commit comments