October 2014
Intermediate to advanced
280 pages
7h 20m
English
So, here’s the good news. The application in the previous chapter 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, [] }] |
| | 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 the call to start_link to pass ...
Read now
Unlock full access