senecajs / seneca-web

Http route mapping for Seneca microservices.
MIT License
76 stars 44 forks source link

Add middleware per route #128

Closed kasongoyo closed 6 years ago

kasongoyo commented 6 years ago

This pull request introduce a way to pass middleware instanc when defining route so that it can be utilized adapters when adding route to express or hapi context.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.2%) to 91.729% when pulling b8e5cf08d4c194a544aac513c29876b62dace2ba on kasongoyo:master into fdbbd69d1b40ed87a8a53e9358555138aa06c561 on senecajs:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.9%) to 90.672% when pulling 2a35ec0eef5b0473fd04406f4fa4f196f4dffe66 on kasongoyo:master into fdbbd69d1b40ed87a8a53e9358555138aa06c561 on senecajs:master.

kasongoyo commented 6 years ago

Hey @tswaters, I wish to add my changes to the doc but I want to hear your opinions first about the changes I have made, remember you have not replied in the discussion we had in the issues section

tswaters commented 6 years ago

Just noticed that web.test.js is completely devoid of actual tests. With some of the changes I've requested, there is another branch, and coverage will decrease... I'm not sure if it'll be enough to break the build, if it does don't worry about that -- I'll likely fix it after merge.

Also, don't be afraid to add yourself to contributers key in package.json.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.6%) to 90.943% when pulling 0b8ad2e12e1e5c58e9883785316c988d272dc76d on kasongoyo:master into fdbbd69d1b40ed87a8a53e9358555138aa06c561 on senecajs:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.6%) to 90.943% when pulling 0b8ad2e12e1e5c58e9883785316c988d272dc76d on kasongoyo:master into fdbbd69d1b40ed87a8a53e9358555138aa06c561 on senecajs:master.

tswaters commented 6 years ago

This looks pretty close.... I'm going to close this PR, but merge your branch into feature/middleware and fix up the readme with a few straggling issues before releasing this.

Once this is done, we need to get the web-adapters updated... as mentioned above I've already done a few of them and I see you started with the seneca-web adapter... if you want to start on that, feel free.

tswaters commented 6 years ago

Thanks you @kasongoyo for all your hard work! I'm going to close this & move it to #130

Going to sit on this for a few days probably, come back and take a fresh look & hopefully get a new release out on the weekend sometime.

kasongoyo commented 6 years ago

Thanks @tswaters for your assistance. Thanks more for improving docs regarding middleware feature. The doc is real nice