Setting up your development environment for the first time
Learn how to install Node.js, Npm, Git and authenticating with Github
Table of contents
Installing Git and Node.js on your computer is the first and minuscule step in setting up a development environment for Javascript development. In this article, I will walk you through the process of installing both Git and Node.js and authenticating with GitHub for the first time.
Installing Git
First, let's start with installing Git. The easiest way to install Git is to download the installer from the official Git website (git-scm.com/downloads). Once the installer is downloaded, simply run the installer and follow the prompts to install Git on your computer.
Once you've installed Git, open command prompt and type in the command below to confirm that Git has been installed successfully.
git --version
Installing Node.js
Next, let's move on to installing Node.js. Similar to Git, the easiest way to install Node.js is to download the installer from the official Node.js website (nodejs.org/en/download). Once the installer is downloaded, simply run the installer and follow the prompts to install Node.js on your computer.
To confirm that Node.js has been installed successfully, open a terminal or command prompt and type in "node -v
" and "npm -v
" to check the version of Node and NPM respectively. As illustrated below
# Checks for version of Node js installed
node -v
# Checks for version of Npm installed
npm -v
Authenticating with Github
Now that you have Git and Node.js installed on your computer, it's time to authenticate with GitHub. To do this, you'll need to generate a SSH key. A SSH key is a unique code that is used to identify you when you're connecting to a GitHub repository.
To generate a SSH key, open a terminal or command prompt and type in
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Replace "youremail@example.com" with your actual email address. This will generate a SSH key for you.
Once you've generated your SSH key, you'll need to add it to your GitHub account.
Add SSH key to GitHub profile
To do this, visit your GitHub profile and click on the dropdown arrow beside the avatar, It will display a dropdown menu from which you can select settings from.
In the settings pane, navigate to the "SSH and GPG keys" section.
Click on the "New SSH key" button and paste the contents of your SSH key into the "Key" field.
Then, give your key a name and click on the "Add SSH key" button.
Conclusion
With this, you have successfully installed Git and Node.js on your computer, and authenticated with GitHub. Now you are ready to start working on your project and start using GitHub to manage your code.
Sharing my understanding of concepts and approaches to problem-solving gives me happiness and it also helps me further my career. If you have any questions, feel free to reach out!
Connect with me on Twitter, LinkedIn, and GitHub!
Also, reach out to me, if you love to discuss startup building and and building open source software directly through my email📧 .