Skip to content

Command line app that concurrently downloads weather

Notifications You must be signed in to change notification settings

lewapkon/weatherex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weatherex

Command line app that:

  1. In one thread downloads temperature from anywhere using any HTTP REST API and refreshes every 3 seconds.
  2. In another thread downloads temperature from anywhere using the WebSocket protocol.
  3. Both threads save their readings to a shared state.
  4. When the shared state changes the thread with lower temperature reading should output to console where the temperature is lower and where is it higher.

Usage

mix deps.get
mix escript.build
./weatherex [city]

city is a parameter that sets city for the HTTP API. It defaults to Warsaw

Because of the specifics of the api services that are used, temperature readings usually don't change while the app is working. The WebSocket API is supposed to send data every minute, however sometimes it just stops after the first message sent.

About

Command line app that concurrently downloads weather

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages