Elm Front-end for Rust API (Part 1)

in #utopian-io8 years ago (edited)

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



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @tensor I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • You are generating more rewards than average for this category. Super!;)
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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.

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.096
BTC 61821.29
ETH 1727.74
USDT 1.00
SBD 0.39