Comments (6)
@chacliff thanks for opening an issue. Although we probably won't add comments throughout the code, it is a good idea to address this stuff via guides on the wiki.
from frame.
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.
from frame.
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?
from frame.
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.
from frame.
@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 require
'd in Hapi are capitalized. There are a handful of these quirks that a Hapi 8 developer should be familiar with. You can find a brief layout of these kinda things written by the project maintainer (Eran Hammer): https://gist.github.com/hueniverse/a06f6315ea736ed1b46d
from frame.
Closing for now. The hapi docs are great and the reference I use.
from frame.
Related Issues (20)
- Add Hapi-Auth-Cookie authentication support HOT 1
- how to upload it on heroku?? can u upload document with details? HOT 1
- Unauthorized when running first-time-setup HOT 1
- Better way for manage user sessions HOT 3
- is it useful ? HOT 1
- Middleware for checking permissions HOT 1
- bcryptjs instead of bcrypt HOT 1
- iife is a better way HOT 1
- Useless config
- Route “config” is now “options”
- different structure for better scale
- Api doc is unavailable HOT 2
- npm test not working HOT 2
- Can you provide the api document? HOT 1
- No documentation on the 50 endpoints across 11 categories included in this user API starter HOT 6
- Client-side for frame HOT 1
- Purpose of status model should be documented HOT 1
- Swagger Issues HOT 13
- Switch framework default authentication to cookies/sessions instead of basic auth HOT 6
- Question: non-hapi version? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frame.