This function is used in each of the http_~() methods
as well as the cors(), websocket() and use() utility
functions.
.routeMiddleware(beakr, FUN, path = NULL, method = NULL, websocket = FALSE)Beakr instance.
Function to route middleware.
Path to route the middleware.
HTTP method to employ.
Boolean, TRUE if websocket.
A Beakr instance with added middleware.