Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eggy115/elm
Elm
https://github.com/eggy115/elm
elm
Last synced: 5 days ago
JSON representation
Elm
- Host: GitHub
- URL: https://github.com/eggy115/elm
- Owner: Eggy115
- License: gpl-3.0
- Created: 2023-04-06T10:34:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-18T18:49:26.000Z (over 1 year ago)
- Last Synced: 2024-11-16T22:16:58.744Z (about 1 month ago)
- Topics: elm
- Language: Elm
- Homepage: https://github.com/Eggy115/Elm
- Size: 117 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Elm
Elm is a functional programming language used for building web applications. Here's an example of a "Hello, World!" program in Elm:Install Elm on your machine by following the instructions on the Elm website.
Create a new file named "Main.elm" and add the following code:
```elm
module Main exposing (..)import Html exposing (text)
main =
text "Hello, World!"
This program defines a module named "Main" that imports the text function from the Html module. The main function creates a text node containing the "Hello, World!" message.
```Compile the Elm program by running the following command in your terminal:
```css
elm make Main.elm --output=main.js
```This command will generate a JavaScript file named "main.js" that contains the compiled Elm code.
Create a new HTML file named "index.html" and add the following code:
```html
Hello, World!
```
This file imports the compiled Elm code from the "main.js" file and includes it in the HTML page.
Open the "index.html" file in a web browser to see the "Hello, World!" message displayed on the page.
When this program is compiled and run in a web browser, it will display the "Hello, World!" message on the page.