• RouterAdd registers a new route definition.

    Example:

    routerAdd("GET", "/hello", (e) => {
    return e.json(200, {"message": "Hello!"})
    }, $apis.requireAuth())

    Note that this method is available only in pb_hooks context.

    Parameters

    • method: string
    • path: string
    • handler: ((e) => void)
    • Rest ...middlewares: (string | ((e) => void) | Middleware)[]

    Returns void

Generated using TypeDoc