### Hierarchy

- IRouter
- Application
  - Application
    - Opine

### Callable

- __call(req: OpineRequest, res?: OpineResponse): void

- - Defined in home/runner/work/opine/opine/src/types.ts:1053

  Opine instance itself is a request handler, which could be invoked without third argument.

  #### Parameters

  - ##### req: OpineRequest

  - ##### Optional res: OpineResponse

  #### Returns void

## Index

### Properties

- _params
- _router
- all
- cache
- caseSensitive
- checkout
- connect
- copy
- delete
- engines
- get
- head
- locals
- lock
- m-search
- merge
- mergeParams
- mkactivity
- mkcol
- mountpath
- move
- notify
- options
- params
- parent
- patch
- post
- propfind
- proppatch
- purge
- put
- report
- router
- routes
- search
- settings
- stack
- strict
- subscribe
- trace
- unlock
- unsubscribe
- use

### Methods

- defaultConfiguration
- disable
- disabled
- emit
- enable
- enabled
- engine
- handle
- init
- lazyrouter
- listen
- on
- param
- path
- process_params
- render
- route
- set

## Properties

### _params

_params: any[]

Inherited from IRouter._params

- Defined in home/runner/work/opine/opine/src/types.ts:200

### _router

_router: Router

- Defined in home/runner/work/opine/opine/src/types.ts:1170

Used to get all registered routes in Opine Application

### all

all: IRouterMatcher<this, "all">

Inherited from IRouter.all

- Defined in home/runner/work/opine/opine/src/types.ts:144

Special-cased "all" method, applying the given route `path`, middleware, and callback to every HTTP method.

### cache

cache: any

- Defined in home/runner/work/opine/opine/src/types.ts:1199

### caseSensitive

caseSensitive: boolean

Inherited from IRouter.caseSensitive

- Defined in home/runner/work/opine/opine/src/types.ts:202

### checkout

checkout: IRouterMatcher<this>

Inherited from IRouter.checkout

- Defined in home/runner/work/opine/opine/src/types.ts:153

### connect

connect: IRouterMatcher<this>

Inherited from IRouter.connect

- Defined in home/runner/work/opine/opine/src/types.ts:154

### copy

copy: IRouterMatcher<this>

Inherited from IRouter.copy

- Defined in home/runner/work/opine/opine/src/types.ts:155

### delete

delete: IRouterMatcher<this, "delete">

Inherited from IRouter.delete

- Defined in home/runner/work/opine/opine/src/types.ts:148

### engines

engines: any

- Defined in home/runner/work/opine/opine/src/types.ts:1203

### get

get: (setting: string) => any & IRouterMatcher<this>

Overrides IRouter.get

- Defined in home/runner/work/opine/opine/src/types.ts:1095

### head

head: IRouterMatcher<this, "head">

Inherited from IRouter.head

- Defined in home/runner/work/opine/opine/src/types.ts:151

### locals

locals: any

- Defined in home/runner/work/opine/opine/src/types.ts:1155

### lock

lock: IRouterMatcher<this>

Inherited from IRouter.lock

- Defined in home/runner/work/opine/opine/src/types.ts:156

### m-search

m-search: IRouterMatcher<this>

Inherited from IRouter.m-search

- Defined in home/runner/work/opine/opine/src/types.ts:161

### merge

merge: IRouterMatcher<this>

Inherited from IRouter.merge

- Defined in home/runner/work/opine/opine/src/types.ts:157

### mergeParams

mergeParams: boolean

Inherited from IRouter.mergeParams

- Defined in home/runner/work/opine/opine/src/types.ts:203

### mkactivity

mkactivity: IRouterMatcher<this>

Inherited from IRouter.mkactivity

- Defined in home/runner/work/opine/opine/src/types.ts:158

### mkcol

mkcol: IRouterMatcher<this>

Inherited from IRouter.mkcol

- Defined in home/runner/work/opine/opine/src/types.ts:159

### mountpath

mountpath: string | string[]

- Defined in home/runner/work/opine/opine/src/types.ts:1197

The app.mountpath property contains one or more path patterns on which a sub-app was mounted.

### move

move: IRouterMatcher<this>

Inherited from IRouter.move

- Defined in home/runner/work/opine/opine/src/types.ts:160

### notify

notify: IRouterMatcher<this>

Inherited from IRouter.notify

- Defined in home/runner/work/opine/opine/src/types.ts:162

### options

options: IRouterMatcher<this, "options">

Inherited from IRouter.options

- Defined in home/runner/work/opine/opine/src/types.ts:150

### params

params: any

Inherited from IRouter.params

- Defined in home/runner/work/opine/opine/src/types.ts:199

### parent

parent: any

- Defined in home/runner/work/opine/opine/src/types.ts:1201

### patch

patch: IRouterMatcher<this, "patch">

Inherited from IRouter.patch

- Defined in home/runner/work/opine/opine/src/types.ts:149

### post

post: IRouterMatcher<this, "post">

Inherited from IRouter.post

- Defined in home/runner/work/opine/opine/src/types.ts:146

### propfind

propfind: IRouterMatcher<this>

Inherited from IRouter.propfind

- Defined in home/runner/work/opine/opine/src/types.ts:163

### proppatch

proppatch: IRouterMatcher<this>

Inherited from IRouter.proppatch

- Defined in home/runner/work/opine/opine/src/types.ts:164

### purge

purge: IRouterMatcher<this>

Inherited from IRouter.purge

- Defined in home/runner/work/opine/opine/src/types.ts:165

### put

put: IRouterMatcher<this, "put">

Inherited from IRouter.put

- Defined in home/runner/work/opine/opine/src/types.ts:147

### report

report: IRouterMatcher<this>

Inherited from IRouter.report

- Defined in home/runner/work/opine/opine/src/types.ts:166

### router

router: string

- Defined in home/runner/work/opine/opine/src/types.ts:1151

### routes

routes: any

- Defined in home/runner/work/opine/opine/src/types.ts:1165

The app.routes object houses all of the routes defined mapped by the associated HTTP verb. This object may be used for introspection capabilities, for example Opine uses this internally not only for routing but to provide default OPTIONS behaviour unless app.options() is used. Your application or framework may also remove routes by simply by removing them from this object.

### search

search: IRouterMatcher<this>

Inherited from IRouter.search

- Defined in home/runner/work/opine/opine/src/types.ts:167

### settings

settings: any

- Defined in home/runner/work/opine/opine/src/types.ts:1153

### stack

stack: any[]

Inherited from IRouter.stack

- Defined in home/runner/work/opine/opine/src/types.ts:209

Stack of configured routes

### strict

strict: boolean

Inherited from IRouter.strict

- Defined in home/runner/work/opine/opine/src/types.ts:204

### subscribe

subscribe: IRouterMatcher<this>

Inherited from IRouter.subscribe

- Defined in home/runner/work/opine/opine/src/types.ts:168

### trace

trace: IRouterMatcher<this>

Inherited from IRouter.trace

- Defined in home/runner/work/opine/opine/src/types.ts:169

### unlock

unlock: IRouterMatcher<this>

Inherited from IRouter.unlock

- Defined in home/runner/work/opine/opine/src/types.ts:170

### unsubscribe

unsubscribe: IRouterMatcher<this>

Inherited from IRouter.unsubscribe

- Defined in home/runner/work/opine/opine/src/types.ts:171

### use

use: ApplicationRequestHandler<this>

Overrides IRouter.use

- Defined in home/runner/work/opine/opine/src/types.ts:1172

## Methods

### defaultConfiguration

- defaultConfiguration(): void

- - Defined in home/runner/work/opine/opine/src/types.ts:1075

  Initialize application configuration.

  #### Returns void

### disable

- disable(setting: string): this

- - Defined in home/runner/work/opine/opine/src/types.ts:1138

  Disable `setting`.

  #### Parameters

  - ##### setting: string

  #### Returns this

### disabled

- disabled(setting: string): boolean

- - Defined in home/runner/work/opine/opine/src/types.ts:1132

  Check if `setting` is disabled.

  app.disabled('foo') // => true

  app.enable('foo') app.disabled('foo') // => false

  #### Parameters

  - ##### setting: string

  #### Returns boolean

### emit

- emit(event: string, arg: any): any

- - Defined in home/runner/work/opine/opine/src/types.ts:1192

  Emit an event using the applications event emitter.

  Events will be raised based on the passed event string and any listening on() methods will receive the passed arg as an argument.

  #### Parameters

  - ##### event: string

  - ##### arg: any

  #### Returns any

### enable

- enable(setting: string): this

- - Defined in home/runner/work/opine/opine/src/types.ts:1135

  Enable `setting`.

  #### Parameters

  - ##### setting: string

  #### Returns this

### enabled

- enabled(setting: string): boolean

- - Defined in home/runner/work/opine/opine/src/types.ts:1120

  Check if `setting` is enabled (truthy).

  app.enabled('foo') // => false

  app.enable('foo') app.enabled('foo') // => true

  #### Parameters

  - ##### setting: string

  #### Returns boolean

### engine

- engine(ext: string, fn: (path: string, options: Record<string, unknown>, callback: (e: any, rendered: string) => void) => void): this

- - Defined in home/runner/work/opine/opine/src/types.ts:1209

  Register the given template engine callback `fn` for the provided extension `ext`.

  #### Parameters

  - ##### ext: string

  - ##### fn: (path: string, options: Record<string, unknown>, callback: (e: any, rendered: string) => void) => void

    - - (path: string, options: Record<string, unknown>, callback: (e: any, rendered: string) => void): void

      - #### Parameters

        - ##### path: string

        - ##### options: Record<string, unknown>

        - ##### callback: (e: any, rendered: string) => void

          - - (e: any, rendered: string): void

            - #### Parameters

              - ##### e: any

              - ##### rendered: string

              #### Returns void

  #### Returns this

### Private handle

- handle(req: OpineRequest, res: OpineResponse, next?: NextFunction): void

- Inherited from IRouter.handle

  - Defined in home/runner/work/opine/opine/src/types.ts:185

  Dispatch a req, res pair into the application. Starts pipeline processing.

  If no callback is provided, then default error handlers will respond in the event of an error bubbling through the stack.

  #### Parameters

  - ##### req: OpineRequest

  - ##### res: OpineResponse

  - ##### Optional next: NextFunction

  #### Returns void

### init

- init(): void

- - Defined in home/runner/work/opine/opine/src/types.ts:1070

  Initialize the server.

  - setup default configuration
  - setup default middleware
  - setup route reflection methods

  #### Returns void

### lazyrouter

- lazyrouter(): void

- - Defined in home/runner/work/opine/opine/src/types.ts:1083

  Lazily adds the base router if it has not yet been added.

  We cannot add the base router in the defaultConfiguration because it reads app settings which might be set after that has run.

  #### Returns void

### listen

- listen(): Server
- listen(port: number, callback?: () => void): Server
- listen(addr: string, callback?: () => void): Server
- listen(options: HTTPOptions, callback?: () => void): Server
- listen(options: HTTPSOptions, callback?: () => void): Server

- - Defined in home/runner/work/opine/opine/src/types.ts:1145

  Listen for connections.

  A Deno `Server` is returned.

  #### Returns Server

- - Defined in home/runner/work/opine/opine/src/types.ts:1146

  #### Parameters

  - ##### port: number

  - ##### Optional callback: () => void

    - - (): void

      - #### Returns void

  #### Returns Server

- - Defined in home/runner/work/opine/opine/src/types.ts:1147

  #### Parameters

  - ##### addr: string

  - ##### Optional callback: () => void

    - - (): void

      - #### Returns void

  #### Returns Server

- - Defined in home/runner/work/opine/opine/src/types.ts:1148

  #### Parameters

  - ##### options: HTTPOptions

  - ##### Optional callback: () => void

    - - (): void

      - #### Returns void

  #### Returns Server

- - Defined in home/runner/work/opine/opine/src/types.ts:1149

  #### Parameters

  - ##### options: HTTPSOptions

  - ##### Optional callback: () => void

    - - (): void

      - #### Returns void

  #### Returns Server

### on

- on(event: string, callback: (args: any) => any): any

- - Defined in home/runner/work/opine/opine/src/types.ts:1183

  The mount event is fired on a sub-app, when it is mounted on a parent app. The parent app is passed to the callback function.

  NOTE: Sub-apps will:

  - Not inherit the value of settings that have a default value. You must set the value in the sub-app.
  - Inherit the value of settings with no default value.

  #### Parameters

  - ##### event: string

  - ##### callback: (args: any) => any

    - - (args: any): any

      - #### Parameters

        - ##### args: any

        #### Returns any

### param

- param(name: string | string[], fn: RequestParamHandler): this

- Overrides IRouter.param

  - Defined in home/runner/work/opine/opine/src/types.ts:1096

  #### Parameters

  - ##### name: string | string[]

  - ##### fn: RequestParamHandler

  #### Returns this

### path

- path(): string

- - Defined in home/runner/work/opine/opine/src/types.ts:1108

  Return the app's absolute pathname based on the parent(s) that have mounted it.

  For example if the application was mounted as "/admin", which itself was mounted as "/blog" then the return value would be "/blog/admin".

  #### Returns string

### Private process_params

- process_params(layer: any, called: any, req: OpineRequest, res: OpineResponse, done: NextFunction): void

- Inherited from IRouter.process_params

  - Defined in home/runner/work/opine/opine/src/types.ts:191

  #### Parameters

  - ##### layer: any

  - ##### called: any

  - ##### req: OpineRequest

  - ##### res: OpineResponse

  - ##### done: NextFunction

  #### Returns void

### render

- render(name: string, options?: any, callback?: (err: Error, html: string) => void): void
- render(name: string, callback: (err: Error, html: string) => void): void

- - Defined in home/runner/work/opine/opine/src/types.ts:1229

  Render the given view `name` name with `options` and a callback accepting an error and the rendered template string.

  Example:

  app.render('email', { name: 'Deno' }, function(err, html) { // ... })

  #### Parameters

  - ##### name: string

  - ##### Optional options: any

  - ##### Optional callback: (err: Error, html: string) => void

    - - (err: Error, html: string): void

      - #### Parameters

        - ##### err: Error

        - ##### html: string

        #### Returns void

- - Defined in home/runner/work/opine/opine/src/types.ts:1234

  #### Parameters

  - ##### name: string

  - ##### callback: (err: Error, html: string) => void

    - - (err: Error, html: string): void

      - #### Parameters

        - ##### err: Error

        - ##### html: string

        #### Returns void

### route

- route(prefix: PathParams): IRoute

- Inherited from IRouter.route

  - Defined in home/runner/work/opine/opine/src/types.ts:175

  #### Parameters

  - ##### prefix: PathParams

  #### Returns IRoute

### set

- set(setting: string, value?: any): this

- - Defined in home/runner/work/opine/opine/src/types.ts:1094

  Assign `setting` to `val`, or return `setting`'s value.

  app.set('foo', 'bar'); app.get('foo'); // => "bar"

  Mounted servers inherit their parent server's settings.

  #### Parameters

  - ##### setting: string

  - ##### Optional value: any

  #### Returns this

Generated using TypeDoc