Installing and setting up Elm

Ronn Ross
InstructorRonn Ross
Share this video with your friends

Social Share Links

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 Elm-lang.org. 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.

egghead
egghead
~ a minute ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today