Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (21 loc) · 1.64 KB

File metadata and controls

31 lines (21 loc) · 1.64 KB

Pop

This is a coding exercise to test your understanding of two parts of our current tech stack. These parts are React and Elixir/Phoenix. In the Javascript code, React, ReactRedux, ReactRouter have already been included. For CSS, we use TailwindCSS, so we'd appreciate it if you attempted to use TailwindCSS for your styling. You do not have to use Redux or ReactRouter, but can if you want. For server code only Phoenix and Phoenix.HTML have been added.

To get the Phoenix server started

  • Install dependencies with mix deps.get
  • Change to the assets directory
  • Install Node.js dependencies with yarn
  • cd .. to the root of the Elixir app
  • Start Phoenix endpoint with mix phx.server

There are two parts of this task.

  1. Build an endpoint that returns a list of fahrenheit temperatures. There is already a prepared controller at ./lib/pop_web/controllers/temperature.ex.
  2. Use React to display the fahrenheit temperatures along with the corresponding celsius and kelvin representations in a table. There is a Conversion component placeholder in assets/js/conversion.js.

Tests

  • Elixir tests will be run with mix test
  • React tests will be run with yarn run jest from the assets directory

Once you've started the server with mix phx.server then you can visit localhost:4000 from your browser.

Learn more