May 2018
Intermediate to advanced
412 pages
9h 3m
English
So, here’s the good news. The application here is already a full-blown OTP application. When mix created the initial project tree, it added a supervisor (which we then modified) and enough information to our mix.exs file to get the application started. In particular, it filled in the application function:
| | def application do |
| | [ |
| | mod: { |
| | Sequence.Application, [] |
| | }, |
| | extra_applications: [:logger], |
| | ] |
| | end |
This says that the top-level module of our application is called Sequence. OTP assumes this module will implement a start function, and it will pass that function an empty list as a parameter.
In our previous version of the start function, we ignored the arguments and instead hard-wired ...
Read now
Unlock full access