Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Union is not actively developed anymore, see [1]. Union provides a middleware capability similar to connect [2] supporting buffered streams and providing some convenience APIs on top of the middleware capability. However, the stream functionality offered by union is already available since Node.js v0.12 [3] and Tabris CLI does not use most of the APIs union offered. Migrate middleware handling to connect. Opt for connect instead of express, since Tabris CLI does not use most of the extra features express offers and express comes with significantly more external dependencies (currently connect 4 vs express 30). Error handling notes: * connect errors do not have a status field. Only log the error message. * connect does not handle 404 as an error as union did. Restore this behavior by using an extra middleware to catch all unhandled requests and treat them as errors. [1]: http-party/http-server#138 (comment) [2]: https://www.npmjs.com/package/connect [3]: flatiron/union#61 (comment) Fix #71 Change-Id: If502571e61f53098afd6cbfbfa66e8053691eeda
- Loading branch information
Showing
6 changed files
with
114 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters