diff --git a/README.md b/README.md index 1d65599..f870eb7 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ Customize your route by extending the RouterBase class's route property. The ea | notFound | _boolean_ | `false` | Marks the file as one that handles HTTP 404 Not Found requests. This is called when no routes match. Useful for overriding the default 404 web page. | | methodNotAllowed | _boolean_ | `false` | Marks the file as one that handles HTTP 405 Method Not Allowed requests. This is called when an HTTP method is used with a route class that does not have that method defined as a function. Useful for overriding the default 405 web page. | | serverError | _boolean_ | `false` | Marks the file as one that handles HTTP 500 Server Error requests. This is called when something within node.js throws an error before it can successfully handle a request. Useful for overriding the default 500 web page. | +| middleware | _RequestHandler>[] | WebsocketRequestHandler[]_ | `[]` | An array of middleware that will apply only to this route. Can handle both express and express-ws middleware, depending on the value of `webSocket`. | You should only ever need to define at most *one* of these properties, with one exception: you need to define both `path` and `webSocket` to create a web socket route class. There are other properties on the default route object that are not listed here, which should be considered internal properties. @@ -365,6 +366,9 @@ class NotFound extends HotRouter.Home { ## Versions +### v1.0.0 Beta 7 - 8/31/2021 +* Allow for middleware to be defined at the route level. + ### v1.0.0 Beta 6 - 8/30/2021 * Package updates. diff --git a/package.json b/package.json index 9d6e2bc..b35e094 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hot-router", - "version": "1.0.0-beta.6", + "version": "1.0.0-beta.7", "description": "A router for Express that lets you setup route classes to easily create routes. You can hot swap the code inside your route classes while your application is running.", "homepage": "https://github.com/roncli/hot-router", "bugs": {