Skip to content

Connect likeの実装 #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 19, 2015
Merged

Connect likeの実装 #65

merged 11 commits into from
Sep 19, 2015

Conversation

azu
Copy link
Owner

@azu azu commented Sep 17, 2015

#22 の仕組みを解説するための実装。

  • 入力は何でもいい object.valueとなるように制限した
  • 出力も何でもいい objectとなるようにした
  • middlewareはnextを受け取りnextを呼び出したら次へ
  • ErrorHandlingが登録順に依存してる -> Connectもそうだった(最後にエラーハンドリングする)
  • nextを呼び出さなかったら? -> 止まる -> Connectもそうだった
  • 文章での解説


[import junction.js](../../src/connect/junction.js)

実装を見てみると、`use`で_middleware_を登録して、`process`で登録したミドルウェアを順番に実行していきます。
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ミドルウェア…

azu added a commit that referenced this pull request Sep 19, 2015
@azu azu merged commit d14ddf5 into master Sep 19, 2015
@azu azu deleted the connect-like branch September 19, 2015 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant