NodeJS Module Tutorial: A New Series
Okta has a REST API and
an npm module available for use. However since JumpCloud lacked an npm module, I was on my own for an interface. After writing the first version I realized the code was halfway decent and could be useful for a module. I had no idea how to write a node module so I embarked upon learning all the different bits and pieces as I went. There was no single document I used, so I figured it was worth writing something for those future coders who think writing a module is “hard” (hint: It’s really not).
This tutorial series will be broken down into a number of posts, each covering a different step in the process of building a full (and community friendly) node module.
- Turning functions into module patterns
- README’s for everyone
- Writing tests
- Using Travis CI
- Publishing code to npm
The examples from this tutorial will be based off the jumpcloud module now available on npm. You can also find the code on github under jumpcloud-node. If there are any areas of module use that you think I’ve forgotten to cover, please let me know and I’ll see what I can do.