Building Command Line Applications in Node.js 8
Most of us use command line applications in our jobs every day. This course will introduce you to the basics of building a CLI in Node.js, including managing configuration, interacting with the user, and distributing your finished product.
What you'll learn
Maybe your team has a process you'd like to automate, or systems you'd like to integrate. In this course, Building Command Line Applications in Node.js 8, you’ll learn how to leverage the command line to create reusable applications for yourself, your team, or the world. First, you’ll learn how to effectively manage an application's configuration. Next, you’ll explore ways to interact with the user. Finally, you’ll discover how to package and distribute your application. When you’re finished with this course, you’ll have a foundational knowledge of building a Node.js CLI that will prove invaluable as you look to optimize and operationalize the work of yourself or your team.
Table of contents
- A Brief Overview of Configuration Information 7m
- Demo: Storing the Twitter API Key and Secret in Your Project 9m
- Mocking and Testing Command Line Applications 1m
- Demo: Adding Tests to Your Sample Project 6m
- Handling Sensitive Configuration Data 1m
- Demo: Adding Your Twitter API Secret to the Keychain 5m
- Summary 1m
- Handling Errors and Setting an Exit Status 4m
- Demo: Add Error Handling and Proper Exit Statuses 12m
- A Pattern for Environment Variable Overrides 3m
- Demo: Implementing Environment Overrides for Credentials 3m
- File Descriptors and Dealing with Unbounded Input 6m
- Demo: Lookup Users via Standard In or Command Line 14m
- Demo: Piping from Your CLI to JQ and Back Again 5m
- Future Integration Opportunities and Summary 2m
- Scoped Packages, Publishing to npm, and Using npx 3m
- Demo: Publishing Your CLI to npm, Running It with npx 4m
- Adding Update Notifications, Travis CI Automation 2m
- Demo: Automating Your npm Publish with GitHub and Travis CI 10m
- Creating a Docker Image of Your Command Line Application 1m
- Demo: Creating a Docker Image, Updating Your Travis Automation 11m
- Summary 1m