Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.34 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.34 KB

Server examples in Elixir with tests

Build Status

A number of code examples with accompanying tests written for the “OTP, Concurrency and Testing Strategies” talk, presented in Montreal Elixir, April 12th, 2017. Slides are available for this talk.

What's included

  • adder: server to add values and return total
  • blog: counter server added to a Phoenix app
  • calculator: simple stack calculator server
  • counter: shared counter server
  • stack: stack server using only primitives
  • tick: server to demonstrate timed sends
  • writer: file writer and reader server

How to use interactively

For each example, do iex -S mix from the project folder:

iex> {:ok, pid} = Counter.start_link
iex> Counter.read pid
iex> Counter.stop pid

How to run tests

For each example, do mix test to run tests. To run all tests in all examples, do mix test from the parent folder.

Author

Adrián Mugnolo

License

These examples are released under the MIT license. See LICENSE.