@novice1/app - v0.9.1
    Preparing search index...

    Class FrameworkApp

    The application

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    __app: Application
    __router: IRouter

    Accessors

    • get _app(): Application

      Express Application

      Returns Application

    • get _router(): IRouter

      Main router

      Returns IRouter

    • get building(): boolean

      Returns boolean

    • get built(): boolean

      Returns boolean

    • get meta(): RouteMeta[]

      Returns RouteMeta[]

    • get server(): undefined | Server<typeof IncomingMessage, typeof ServerResponse>

      Returns undefined | Server<typeof IncomingMessage, typeof ServerResponse>

    Methods

    • Parameters

      • routers: IRouter | IRouter[]

      Returns this

    • Type Parameters

      • T extends ServerOptions<typeof IncomingMessage, typeof ServerResponse> = ServerOptions<typeof IncomingMessage, typeof ServerResponse>

      Parameters

      • Optionaloptions: null | T
      • Optionalmod: {
            createServer(
                requestListener?: RequestListener<
                    typeof IncomingMessage,
                    typeof ServerResponse,
                >,
            ): Server;
            createServer(
                options: T,
                requestListener?: RequestListener<
                    typeof IncomingMessage,
                    typeof ServerResponse,
                >,
            ): Server;
        }

        Module that will create the server (e.g.: require('https'))

      Returns Server

      const https = require('https');
      const server = app.build(HTTPS_SERVER_OPTIONS, https);
      server.listen(PORT);
    • Parameters

      • setting: string

      Returns this

    • Parameters

      • ext: string
      • fn: (
            path: string,
            options: object,
            callback: (e: any, rendered?: string) => void,
        ) => void

      Returns this

    • Parameters

      • setting: string

      Returns any

    • Type Parameters

      • Route extends string
      • P = RouteParameters<Route>
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>
      • MetaResType = any

      Parameters

      Returns this

    • Type Parameters

      • Path extends string
      • P = RouteParameters<Path>
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>
      • MetaResType = any

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>
      • MetaResType = any

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>
      • MetaResType = any

      Parameters

      Returns this

    • Type Parameters

      • Route extends string
      • P = RouteParameters<Route>
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • Path extends string
      • P = RouteParameters<Path>
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Parameters

      • path: PathParams
      • subApplication: Application

      Returns this

    • Creates a router and adds it to the application.

      Parameters

      • Optionaloptions: RouterOptions

      Returns IRouter

      The created router

    • Parameters

      • Optionalport: number
      • Optionalhostname: string
      • Optionalbacklog: number
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • Optionalport: number
      • Optionalhostname: string
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • Optionalport: number
      • Optionalbacklog: number
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • Optionalport: number
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • path: string
      • Optionalbacklog: number
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • path: string
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • options: ListenOptions
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • handle: unknown
      • Optionalbacklog: number
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • handle: unknown
      • OptionallisteningListener: () => void

      Returns Server

    • Parameters

      • event: string
      • callback: (parent: Application) => void

      Returns this

    • Parameters

      • name: string | string[]
      • handler: RequestParamHandler

      Returns this

    post

    • Parameters

      • setting: string
      • Optionalval: unknown

      Returns this

    • Parameters

      • ...handlers: RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]

      Returns this

    • Parameters

      • ...handlers: RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • Route extends string
      • P = RouteParameters<Route>
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • Path extends string
      • P = RouteParameters<Path>
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Type Parameters

      • P = ParamsDictionary
      • ResBody = any
      • ReqBody = any
      • ReqQuery = ParsedQs
      • Locals extends Record<string, any> = Record<string, any>

      Parameters

      Returns this

    • Parameters

      • path: PathParams
      • subApplication: Application

      Returns this