Elm Front-end for Rust API (Part 1)
What Will I Learn?
- You will learn how to setup Brunch and Node to compile Elm and JavaScript and then run a Rust server with a single command
- You will learn how to properly create an HTTP GET request with Elm.
- You will learn how to decode JSON with Elm
Requirements
- A decent knowledge of the Elm programming language
- An understanding of the Node and Npm ecosystem
- A fair understanding of APIs and JSON
Difficulty
- Intermediate
Description
In this tutorial, we start building out a front end for our Rust API. We do this using the Elm programming language. We first setup a Node and Brunch environment which allows us to compile our Elm code into JavaScript and embed it into a piece of HTML that is being served by our Rust API. We use Brunch to allow us to compile the Elm code and Node modules while also starting the Rust API with one single command. We then build out our Elm front end with very basic functionality; we add an HTTP GET request which decodes the JSON served by our API. We also build a very simplistic view inside of Elm to display our Data.
The source code for this project can be found here
Video Tutorial
Curriculum
- Building a REST API in Rust (Part 1)
- Building a REST API in Rust (Part 2)
- Building a REST API in Rust (Part 3)
Posted on Utopian.io - Rewarding Open Source Contributors
Hey @tensor I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Thank you, @utopian-io I wish I had enough SP to delegate, when I get above 1k I definitely will, but accept this upvote.
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Again, thank you. I hope you've been enjoying my content.