Skip to content

Commit

Permalink
feat: expose router in NitroApp (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jun 20, 2022
1 parent 61ffaef commit ef5e7f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runtime/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App as H3App, createApp, createRouter, lazyEventHandler } from 'h3'
import { App as H3App, createApp, createRouter, lazyEventHandler, Router } from 'h3'
import { createFetch, Headers } from 'ohmyfetch'
import destr from 'destr'
import { createRouter as createMatcher } from 'radix3'
Expand All @@ -13,7 +13,8 @@ import { handlers } from '#internal/nitro/virtual/server-handlers'

export interface NitroApp {
h3App: H3App
hooks: Hookable,
router: Router
hooks: Hookable
localCall: ReturnType<typeof createCall>
localFetch: ReturnType<typeof createLocalFetch>
}
Expand Down Expand Up @@ -65,6 +66,7 @@ function createNitroApp (): NitroApp {
const app: NitroApp = {
hooks,
h3App,
router,
localCall,
localFetch
}
Expand Down

0 comments on commit ef5e7f1

Please sign in to comment.