One code example is a study about elixir OTP applications using GenServe and Supervisors. Following a YouTube class made by omgneering. For more info see the official GenServer DOC and Supervisor DOC.
OBS: The original tutorial has some deprecated implementation, so i refactor the new way of using supervisors. You can find the old way at
example/deprecated-supervisor-implementation
branch and the new way at the master branch.
I use:
- Erlang/OTP 24
- IEx 1.13.4 (compiled with Erlang/OTP 22)
The ZipCode was found on Census.org
For run this application you need to have erlang and Elixir installed. You can follow the ElixirSchool tutorial to help you with that.
Clone this repo and cd into and run
iex -S mix
After compile with the command above you will be able to access ao functions to calculate position base in two zipCodes from USA. For example the distance between Minneapolis, MN ZipCode 55401 to Austin, TX ZipCode78703 run.
ElhexDelivery.PostalCode.Navigator.get_distance(55401, 78703)
The tests are made using ExUnit and can be found on the test folder. To run use
mix test
Create your branches and commits using the English language and following this guideline.
- Feature:
feat/branch-name
- Hotfix:
hotfix/branch-name
- POC:
poc/branch-name
- Example
example/branch-name
- Chore:
chore(context): message
- Feat:
feat(context): message
- Fix:
fix(context): message
- Refactor:
refactor(context): message
- Tests:
tests(context): message
- Docs:
docs(context): message