From the course: Building Your First CLI App in Node
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Implement the GitHub token
From the course: Building Your First CLI App in Node
Implement the GitHub token
- [Instructor] Now we need to move into our index.js file and implement a function to handle the logic from our ship's main bridge involved in acquiring the GitHub o off token. So, if you haven't already, close the GitHub credentials file and open up the index.js file. In order to use the code we just created at the top of our index file, let's call a const here GitHub. Just to create a shorter more readable name for accessing the GitHub credentials file. Now, we'll create a new command for calling up GitHub credentials. So after your first command here, let's call musette again because she's in charge of everything. And set a new command, which I'm going to call octocheck. Next we need to set the description, which, as we just said, is to check user GitHub credentials. Then, we're going to set the action. This time we want to set an async function and this is so that we can make use of the awake functionality that our credentials are using. What action do we want to be performing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Understand user prompts1m 46s
-
(Locked)
Create a prompt for user input2m 24s
-
(Locked)
Validate user input1m 53s
-
(Locked)
Store GitHub credentials for reuse3m 2s
-
(Locked)
Receive the GitHub token3m 39s
-
(Locked)
Authenticate with GitHub2m 29s
-
(Locked)
Register a new token3m 23s
-
(Locked)
Implement the GitHub token3m 31s
-
-
-
-