Scaffolding a module
In this recipe, we’ll be scaffolding our first module; that is, we will set up a typical file and directory structure for our module and learn how to initialize our project with the npm CLI. We’ll also create a GitHub repository to store our module code. GitHub is a hosting provider that allows users to store their Git-based repositories, where Git is a version control system (VCS).
The module we’re going to make will expose an API that converts the temperature in Fahrenheit to Celsius and vice versa.
Getting ready
This recipe will require you to have a GitHub account (https://github.com/join) to publish source code and an npm account (https://www.npmjs.com/signup) to publish your module.
How to do it…
In this recipe, we’ll be using the npm CLI to initialize our temperature-converter module.
- Let’s create a GitHub repository to store our module code. To do this, you can click + | New repository from...