auth0-blog / hapi-jwt-authentication

MIT License
42 stars 14 forks source link

Tutorial Ambiguity #5

Open eight-molecules opened 8 years ago

eight-molecules commented 8 years ago

Just a note that the tutorial over at Auth0 is missing information on the location of some code blocks. The first occurrence is when creating the createUser.js route, where the tutorial says "As we'll see below, we'll get even better validation with Joi." Here the user following the tutorial is given no direction as to where the routes should be placed or how to name it.

In my case I came here to check the directory structure and locate what file should be created. For users less familiar with browsing through source you may want to update the tutorial with file names and locations where they've been omitted. I could add them and submit a PR, but that still leaves the main resource out of sync.

chenkie commented 7 years ago

Thanks for the heads up, looking into it :)

eight-molecules commented 7 years ago

Awesome! When I wrote this I was relatively unexposed to the Hapi ecosystem, and while it's easy to follow now, mentioning that routes are exported and then assigned dynamically later in server.js would have let uninformed me catch onto where server.route receives its arguments quickly and with less confusion as to how Hapi knows where each route is.

I think I can boil this down to newer users needing a little explanation of context when exploring an unopinionated library like this.

chenkie commented 7 years ago

Cool thanks for the feedback :) If you'd like to submit some text to the readme, I'd welcome that :)