Skip to content

Obviate.io

To anticipate and prevent

NodeJS Module Tutorial: A New Series

Posted on 2016-03-01 By Jon No Comments on NodeJS Module Tutorial: A New Series

nodejs-new-pantone-black
nodejs-new-pantone-black

Recently at work we’ve been busy working on a number of security projects. One of the key projects is having our user directory accessible universally which means LDAP. So we’ve undertaken moving our “Directory of Truth” from Okta to JumpCloud. While Okta provides a good product, JumpCloud provides LDAP-as-a-Service (and RADIUS-as-a-service) which has worked very well in my testing so far. What does this have to do with writing a nodeJS module? Well, JumpCloud has a lovely REST API and had no NPM module.

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
  • Badges
  • Documentation

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.

Code Tags:directory, jumpcloud, LDAP, ldap-as-a-service, module, node, node.js, nodejs, nodejs-module-tutorial, okta, radius-as-a-service, series, sso, table of contents

Post navigation

Previous Post: Apple vs FBI = Ends vs Means
Next Post: Super slick logging with PapertrailApp

Related Posts

Bafflingly stupid programming & error reporting Code
SocketIO IRC-style Tutorial – Part 4 – The client code Cloud
Asterisk Manager + Perl + Net::Telnet != Easy Code
SocketIO IRC-style Tutorial – Part 3 – The server code Cloud
SocketIO IRC-style Tutorial – Part 1 – Intro Cloud
Simple and automatic Github deployment using PHP Cloud

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2026 Obviate.io.

Powered by PressBook Masonry Dark