You will learn how to create your first Elm application. This post is part of the functional language series, and it is based on a remarkable book Programming Elm Build Safe and Maintainable Front-End Applications by Jeremy Fairbank.
elm init, you initialize your elm project. In your working folder, you get
src folder where your elm source files go, and the `elm.json` file is created where elm stores your initial project configuration.
" that are used to organize items into logical sections. Here you can add your src directories or add more elm libraries that your application requires. JSON is now widely accepted, and it could be used in various programming languages (Elixir). In REST API communication, JSON format is used for data transfer.
This is our first elm application. The file must have the same name as the module,
Main.elm. We are exposing the
main function that is the entry point to our application. As our
main function is using
text function of
Html module, we need to expose text function.
elm make creates our application in
index.htmlfile. When we opened it in the Browser, we see
- how and when to initialize Elm project
- where to put Elm source files
- what is the purpose of
elm.jsonfile and what is
- purpose of Elm
- how to compile your application
- how to run your application