web-decorators icon indicating copy to clipboard operation
web-decorators copied to clipboard

Create a default adapter without express

Open cybrown opened this issue 9 years ago • 0 comments

Use https://www.npmjs.com/package/route-parser for route matching, implement the concept of routes and middlewares.

  • [ ] Create the main handler function to give to http#createServer()
  • [ ] Create the structure that takes the methods and patterns
  • [ ] Create the api to add routes to the route container
  • [ ] On request, dispatch the request to the right handler, from the pattern and method
  • [ ] Extract path params from the request
  • [ ] Extract query string params from the request
  • [ ] Provide an API to read the request body
  • [ ] Add response related tasks
  • [ ] Add middleware related tasks

cybrown avatar Apr 10 '15 21:04 cybrown