Installing and setting up Elm

Ronn Ross
InstructorRonn Ross

Share this video with your friends

Send Tweet
Published 8 years ago
Updated 5 years ago

Before writing any Elm we need to first install the runtime locally. In this lesson we install the Elm runtime locally and set up a simple application to verify everything is working properly.

[00:00] To get Elm running on your machine, head over to Click on install. There's an installer for Mac, Windows, or MPM. This is the one I prefer. In your terminal, we can run MPM install-g for our global install making it accessible from anywhere in the terminal. I already have this, so I'll skip this step, and just run Elm.

[00:28] We see that there are commands with a description of what they do. Let's clear that out and start by creating a main.elm file. Then you can open your favorite text editor.

[00:41] We can start by importing HTML. Let's just pull in what we need for now. We will create a main. This is the entry point for our app and call the text function to write out "Hello, world." This isn't ready to run.

[00:58] We first need to install some dependencies. Let's type Elm again. We see a packages command. This works similar to MPM, so we can run Elm package install. This installs the core. It asks if we approve this plan. We'll say yes.

[01:15] Now we need to install the HTML package. Again, it asks if we want to install this. It also comes with some dependencies. It wants us to approve those before they're installed.

[01:29] Running Elm again, we see Reactor as a dev server we can use. Let's run that command.

[01:37] Then we can head over to the browser and hit the port listed in the console. We see a listing of files in our project. Click on main.elm. We see "Hello, world." This verifies we have everything installed correctly, and we are ready to start development.