Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/service/types.ts>Service

An ecosystem delivering practices, philosophy and portability.
Go to Latest
interface Service
implements ServiceState<TOptions>
import { type Service } from "https://deno.land/x/hex@0.5.15/src/service/types.ts";

Properties

internalApp: Application<ServiceState<TOptions>>
addMiddleware: (middleware: Middleware) => void
addHealthCheck: (path: string) => void
addRoute: <R extends string, P extends RouteParams<R> = RouteParams<R>, S extends State = Record<string, any>>(
method: HttpMethods,
path: R,
...middlewares: [...RouterMiddleware<R, P, S>[], (ctx: RouterContext<R, P, S> | Context) => unknown] | [(ctx: Context) => unknown],
) => void
configureOptions: (configureOptionsFn: options.ConfigureOptionsFn<TOptions>) => Promise<void>
configureDI: (configureDIFn: (registry: di.Registry) => Promise<void> | void) => Promise<void>
start: () => Promise<void>