-
Notifications
You must be signed in to change notification settings - Fork 156
Comments/description in the code #74
Comments
yes that would be very helpful, then the project could be considered tutorial material. Disecting your project and jumping back and forth between the api references and your project has been fun, but speeding up the process would be appreciated. |
I was going to close this issue but maybe we could take this as an opportunity to outline the things we should document. Would you be willing to share about your experience going between the api references and this project? What things would make that a smoother process? |
as nasty as they are, inline comments would be nice or a description at the top of each document no matter how trivial. That's just generally speaking, I never did figure out how your authentication worked. I tried to implement it myself in a similar fashion. Your directory structure make sense, but maybe explain why you chose to make everything an individual plugin as apposed to making a singular file of routes and sending to controller files. Maybe just adding to the wiki a documentation of the whole thought process on the design would be a good idea too. I'm not sure i ever completely wrapped my head around it. Its like you made reusable plugins that you never planned to reuse. Maybe i never ended up getting a deep enough understanding to know the true purpose. |
@chacliff Express and Hapi are different animals. If you're coming from Express, I would recommend acting like you're a n00b to NodeJS and start at the top of http://hapijs.com, read the "Getting started," "Tutorials," and read (several!) online guides to building simplistic Hapi 8 apps. Build whatever they tell you to. Note: follow Hapi 8 tutorials only. The previous Hapis are gonna confuse you. Hapi doesn't really dictate how you organize a project really. They leave it up to you... but this isn't to say that there are some Hapi-esque conventions. To address what you mentioned, yes, routes (by convention) are displaced into what Hapi calls "plugins." Forget their buzzword, it's just plain 'ole controllers ultimately. Other unusual things you'll notice is that all modules that are |
Closing for now. The hapi docs are great and the reference I use. |
I wanted to ask that you might add a general description to the top of the documents about what they do and control flow to and from the documents. I'm new to the industry and we are using hapi for a webservice project but i would like more information to help the learning process. Especially considering this is an example posted directly on Hapi's site.
The text was updated successfully, but these errors were encountered: