Further learning

Congratulations on getting this far! I won't be covering any new topics in hapi in this book, but hopefully, I've convinced you on hapi as a great choice for your next project or for integrating with a current one. I just wanted to take some time before finishing up to point out some places where you can further your learning on hapi.

Getting started with hapi.js GitHub repo

The first place I would turn to learn more about hapi is the code repository associated with this book. As mentioned in each chapter, all code examples associated with the book are located in a GitHub repository at https://github.com/johnbrett/Getting-Started-with-hapi.js. If you find that any examples were tough to grasp, or would like to explore them in more detail, I recommend cloning the repository and running each example while taking a look at the code. Trying to expand on any of the code examples will be your best source of learning hapi, Node, or coding in general. If you have any further questions on any of the code or would like to have anything cleared up, I encourage you to open an issue.

I will also add extra sample applications to this repository from time to time, which will cover bigger use cases than those covered in this book. I will also gladly take any requests for any applications you would like to see built in hapi through issues on this repo.

Hapijs.com

The hapi website (http://hapijs.com) is a great source of learning material. It contains tutorials that introduce a lot of the basic concepts of hapi, from authentication right down to validation and views. It also has a resources page that contains some sample apps, boilerplate apps, and links to books and videos. It also contains the API documentation from every version of hapi, which is always kept up to date. I really recommend reading the API documentation from start to finish; it may seem like a daunting task, but you'll get through it pretty quickly, trust me. I've done it many times at this stage for each new version of hapi. There is a Need Help? page there for signing up to the mentor program if you would like an advisor in hapi, and finally if you're feeling up to the task of trying to contribute to the hapi ecosystem, the contribute page has a list of issues tagged with new contributor. I highly recommend trying to get involved in trying to contribute to hapi, the community is amazing and will help you through, and it has been one of the biggest resources for learning and furthering my career in recent years, which of course led me to writing this book!

Makemehapi

Makemehapi is a nodeschool workshopper. If you're unfamiliar with the nodeschool format, it consists of a small self-guided workshop that you install through the command line, and then work through the different steps to complete the workshop. You can do these in your own time, or through the many nodeschool chapters around the world where volunteers like myself will help you through the workshops and answer any questions that you have. You can find all the nodeschool workshops on the nodeschool website at http://nodeschool.io/. If you're ever in Ireland, you should drop into the Dublin chapter, and you might find me there!

I highly recommend the makemehapi workshopper to work through some practical examples with hapi. You can install it via the terminal using (one of the only times I'd use a global install!) the following command:

$ npm i makemehapi –g

Run it with the following command:

$ makemehapi

Now follow the instructions. If you have any problems, open an issue on the makemehapi repo at https://github.com/hapijs/makemehapi. Nodeschool also has a wide variety of courses if you would like to learn more about Node (https://github.com/workshopper/learnyounode) or npm (https://github.com/npm/how-to-npm).

The hapi community

hapi's community is one of its best assets. I have always found it hugely welcoming to developers of all backgrounds. If you want to ask a question or interact with the hapi community directly, it is highly encouraged, and there are multitude of mediums to do so.

The hapi discussion repo

The first place I would begin is the hapi discussion repo on GitHub available at https://github.com/hapijs/discuss

This repo is more for discussion and focuses on questions and answers, as opposed to the main hapi repo where you would raise an issue if you encountered a bug (https://github.com/hapijs/hapi). If you read back through closed issues, you'll find many examples of hapi users asking questions to help them debug their problems, and the community helping them out.

Stack Overflow

Stack Overflow has been the main go-to for developers seeking help for as long as I've been a developer! However, as the GitHub community is so strong with hapi, I find questions often get answered quicker and in greater detail there than on Stack Overflow, so you might not find as many examples there as with other frameworks.

hapi Gitter channel

There is a good community (including me!) that will help you out on the hapi Gitter channel (https://gitter.im/hapijs/hapi) if you prefer to chat with other hapi users instead of through GitHub issues. You'll still need a GitHub account to use it, but it's free, quite easy to use, and a nice format for discussion.

@hapijs on Twitter

If you work on or are interested in hapi, it's definitely worth following the @hapijs twitter account. It is a good place to reach out if you're having trouble, or just want to a have a general chat about hapi. Lots of blogs or hapi-related content are tweeted to and from this account, so if you happen across any good blog posts or books (like this one!), it's a good idea to tweet it to the account, to publicize it to all the @hapijs followers.

Read the code!

The final recommendation I would make is to read the source code. The hapi codebase is one of the best I've ever encountered. Reading it has hugely improved my knowledge of how to structure large-scale codebases. However, I find it quite tough to just have a general read of a codebase and pick up much. A better strategy would be to see how something might be implemented in the framework when using a particular feature such as adding a route.

Note

A good tip for trying to walk through a codebase is to look for the main property in the project or the module package.json. The main field indicates the primary entry point to the application or module. You should also add this to any module that you create.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.88.62