Skip to main content

Installation

Installing Node.js

note

If you already have Node.js installed, skip to here.

Node.js is a JavaScript runtime environment that allows you to run JavaScript outside of a browser. It also comes packaged with npm, which is a JS package manager.

First, head to the Node.js website. Now, press the Download Node.js (LTS) button. Open the installer and follow the prompts to install Node.js.

Now, to test it was installed properly, type npm in Command Prompt/Terminal.

You should get a response similar to this:

Command Prompt/Terminal
npm <command>

Usage:

npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
...

If not, check online for support.

Creating your project

Now, to make a project, make a new folder wherever you want, then open it up in Command Prompt/Terminal. Make sure you are in the folder you want. Then, run

Command Prompt/Terminal
npm init
Entry Point

In this guide, we will be using main.js as the entry point. If you're following along, make sure you set it to that too.

Follow the instructions given, change the title, author, description, or version to whatever you'd like.

Installing erlc.js

Now, simply run

Command Prompt/Terminal
npm install erlc.js

Editing the files

To edit these files, you can use any IDE? you want, but Visual Studio Code is really easy to use for beginners.

If you are using Visual Studio Code, to access your files, just run

Command Prompt/Terminal
code .

Now, just make a new file called main.js (or whatever you set for the entry point). Now, to run this file, just run

info

If this doesn't work for you, instead try node main.js, or whatever you set for the entry point.

Command Prompt/Terminal
node .

Don't worry if nothing happened, we haven't put anything in there yet.