devinivy / dogwater

A hapi plugin integrating Waterline ORM
MIT License
102 stars 14 forks source link

Small Example app #1

Closed sircharleswatson closed 9 years ago

sircharleswatson commented 10 years ago

It would be really great if you could make a small example app showing how this works. It looks interesting and I would love to be able to use it but i'm sort of new to node/hapi/js so I can't quite piece it together.

Much appreciated, Charles

devinivy commented 10 years ago

Hi Charles, I'll add this to the todo list. In the meantime, you can checkout a boilerplate for Hapi that uses dogwater called stimpy-medium. stimpy-medium provides a nice structure on top of Hapi that could be useful to you (esp. by providing code examples), and it comes with some good tools/plugins built-in.

Here are the options stimpy-medium uses for dogwater: https://github.com/semateos/stimpy-medium/blob/master/server/config/dogwater.js Here's how to register a Hapi plugin onto a Hapi pack with options: http://hapijs.com/api#packregisterplugins-options-callback and http://hapijs.com/tutorials/plugins (see "Loading a plugin" section).

Best, DK

devinivy commented 10 years ago

The tests I've written also may elucidate how to register dogwater as a plugin: https://github.com/devinivy/dogwater/blob/master/test/index.js .

devinivy commented 10 years ago

I almost forgot! I wrote a little tiny app called wapid that uses dogwater as well. It registers the Hapi plugins using Hapi.Pack.compose, which is an alternative to stimpy-medium's approach.

sircharleswatson commented 10 years ago

Thanks for the response! I actually found those projects right after I opened this issue. haha. So I did check out those examples. Although I think it would still be useful to include examples with dogwater itself.

Thanks again for the update though!

devinivy commented 9 years ago

Resolved by #21. I include a copy-and-paste-able example at the top of the docs.

ogrotten commented 7 years ago

To add to this closed issue: the lack of documentation here has chased this user off as I also was trying to figure it out. The c/p example leaves many questions.