Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xymbol/otp-examples
Code examples for the “OTP, Concurrency and Testing Strategies” talk, as presented in Montreal Elixir, April 12th, 2017.
https://github.com/xymbol/otp-examples
elixir otp test-driven-development
Last synced: 6 days ago
JSON representation
Code examples for the “OTP, Concurrency and Testing Strategies” talk, as presented in Montreal Elixir, April 12th, 2017.
- Host: GitHub
- URL: https://github.com/xymbol/otp-examples
- Owner: xymbol
- License: mit
- Created: 2017-04-17T21:44:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-30T14:07:24.000Z (over 7 years ago)
- Last Synced: 2024-12-11T14:45:33.747Z (23 days ago)
- Topics: elixir, otp, test-driven-development
- Language: Elixir
- Homepage: https://speakerdeck.com/xymbol/otp-concurrency-and-testing-strategies
- Size: 69.3 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Server examples in Elixir with tests
[![Build Status](https://travis-ci.org/xymbol/otp-examples.svg?branch=master)](https://travis-ci.org/xymbol/otp-examples)
A number of code examples with accompanying tests written for the “OTP,
Concurrency and Testing Strategies” talk,
[presented](https://www.meetup.com/montrealelixir/events/238411707/) in Montreal
Elixir, April 12th, 2017. Slides are
[available](https://speakerdeck.com/xymbol/otp-concurrency-and-testing-strategies)
for this talk.## What's included
* [`adder`](adder): server to add values and return total
* [`blog`](blog): counter server added to a Phoenix app
* [`calculator`](calculator): simple stack calculator server
* [`counter`](counter): shared counter server
* [`stack`](stack): stack server using only primitives
* [`tick`](tick): server to demonstrate timed sends
* [`writer`](writer): file writer and reader server## How to use interactively
For each example, do `iex -S mix` from the project folder:
```elixir
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](https://github.com/xymbol)
## License
These examples are released under the MIT license. See [LICENSE](LICENSE).