trailsjs / doc

:books: Trails.js Documentation
Other
18 stars 10 forks source link

Update policy.md #40

Closed clayrisser closed 7 years ago

clayrisser commented 7 years ago

Isn't this the correct way to implement a policy? The way it's documented did not work for me, but this worked.

https://github.com/trailsjs/trails/issues/300

jaumard commented 7 years ago

In fact doc is done for hapi mainly :( and with hapi the previous one was working (and the one you use should also work with hapi) maybe trailpack-express should be modified to allow same as hapi...

@trailsjs/maintainers any feedback here ?

clayrisser commented 7 years ago

Ah, that explains things. We should schedule a time for you to go over in detail the inner workings of the express-trailpack

clayrisser commented 7 years ago

I use it heavily enough that I don't mind (actually want to ) help maintain it.

clayrisser commented 7 years ago

I love Trails, but I like to use it like Sails.

clayrisser commented 7 years ago

Oh, btw, maybe this way of adding policies should still be added to the documentation.

clayrisser commented 7 years ago

https://github.com/trailsjs/doc/pull/41

jaumard commented 7 years ago

Definitely need to be on documentation if hapi supports it, or have clear separation on hapi/express doc and support as we will have some differences between the two...

Don't hesitate to ping me on gitter if you have trouble with trailpack-express or don't understand internal stuff on it :)

scott-wyatt commented 7 years ago

This reminds me, I have a PR to submit for either express or trailpack-router.

clayrisser commented 7 years ago

Cool thanks. I'm going to close this, but I created a new pull request with the alternative way of adding a policy.