1. Getting Started with NodeJS

So! You've been interested in learning some coding so you can check out the RC API. I love that. Getting started on it though, can be a headache.

While there's a ton of programming languages out there. The most ubiquitous programming language is JavaScript. It's got downsides, but most every programming language does. The major upside is that it works in browsers, on your computer locally, servers, the whole nine yards. Makes it very flexible.


There's a couple things you gotta do, right off the bat.

  1. Get a mac (jk)
  2. Download node js!
    • https://nodejs.org/en/
    • Look for the release that says LTS (long term support). Other releases may not be ready for primetime yet
  3. Jump into terminal on mac, or powershell on windows
  4. Just to double check your install type in node -v into the terminal. This should tell you the version you just downloaded.
  5. Next, you need a good code/text editor. I am a huge fan of Visual Studio Code (owned by Microsoft who also just bought Github. More on Github in a separate post)
  6. You're ready to make your first program on your computer!!!!

OK. Let's have you make a first time project. I for one am very excited for you.

Make a new folder somewhere on your computer. I like to have all my stuff under documents, but you may want a folder called Coding or something like that. Up to you.

In there, make a new file called "hello-world". Then, go to VS Code, hit open a folder, and select that hello-world folder you just made.

Once you've got this open in VS Code, you'll get a file explorer window on the left side. Use that to make a file called "index.js".

Next up, you get to write your first bit of code!!!!!! By tradition, you must print out Hello world! You get no choice in this.

In your index.js file, type in the following.

console.log("Hello world!");

Ok. So what's going to happen with the above??

console is the fancy way of saying terminal/powershell. Or whatever you're watching while your code runs (like online logging systems, etc). .log() is a method (function that's tied to some object, more on those later) that simply prints out whatever you put in it's parentheses. Note the quotation marks around the words, this indicates to node that you're printing out a string of characters (h, e, l, l, o, ...) all together. And the end of that, it's really good practice to put a ; to indicate to yourself and others that the line of code (or codeblock) is complete. It's not required by node, just good good practice.

Next up, you're going to run that code!!!

Normally you'd open up powershell or terminal or whatever. But, since VS code rocks, they put an integrated terminal right in the code editor that you can use.

You'll open up that beauty, and type in the below

node index.js

Output should be Hello world! right there in your terminal!

Look at that! Your first program! Doesn't do anything particularly special, but it's a great start!!

Next up, learning to use NPM!