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

Implement the GitHub token

From the course: Building Your First CLI App in Node

Start my 1-month free trial

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…

Contents