Skip to content

Commit

Permalink
Version 1.0.0 Beta 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
roncli committed Sep 1, 2021
1 parent 9407316 commit 2f12cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<ParamsDictionary, any, any, qs.ParsedQs, Record<string, any>>[] | 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.

Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 2f12cb9

Please sign in to comment.