Building Command Line Applications in Node.js

Building Command Line Applications in Node.js

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 3h 03m | 520 MB

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.

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, 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

Course Overview
1 Course Overview

Setting up Your CLI Project
2 A Brief Overview of Command Line Applications
3 Demo – Registering Your Sample Application with Twitter
4 What Makes a Node.js Project a Command Line Application
5 Demo – Initializing Your Node.js Project
6 Summary

Managing Configuration
7 A Brief Overview of Configuration Information
8 Demo – Storing the Twitter API Key and Secret in Your Project
9 Mocking and Testing Command Line Applications
10 Demo – Adding Tests to Your Sample Project
11 Handling Sensitive Configuration Data
12 Demo – Adding Your Twitter API Secret to the Keychain
13 Summary

Interacting with the User
14 CLI Option and Command Patterns
15 Demo – Adding Commands to Your Project with Test Coverage
16 Implementing Twitter s PIN-based OAuth
17 Demo – Adding Another Command
18 Demo – Adding Another Command Part 2
19 Demo – Using the Node Debugger
20 Summary

Interacting with the Environment
21 Handling Errors and Setting an Exit Status
22 Demo – Add Error Handling and Proper Exit Statuses
23 A Pattern for Environment Variable Overrides
24 Demo – Implementing Environment Overrides for Credentials
25 File Descriptors and Dealing with Unbounded Input
26 Demo – Lookup Users via Standard In or Command Line
27 Demo – Piping from Your CLI to JQ and Back Again
28 Future Integration Opportunities and Summary

Packaging and Distribution
29 Scoped Packages Publishing to npm and Using npx
30 Demo – Publishing Your CLI to npm Running It with npx
31 Adding Update Notifications Travis CI Automation
32 Demo – Automating Your npm Publish with GitHub and Travis CI
33 Creating a Docker Image of Your Command Line Application
34 Demo – Creating a Docker Image Updating Your Travis Automation
35 Summary