Function handleApiNotFound

  • Creates a new handler for 404 errors.

    Returns HttpNotFoundHandler

    The new handler.

    Example

    import createServer from '@egomobile/http-server'
    import { handleApiNotFound } from '@egomobile/api-utils'

    const app = createServer()

    app.setNotFoundHandler( handleApiNotFound() )

    // ...

    app.listen()
    .catch(console.error)

Generated using TypeDoc