Run code on application startup Phoenix Framework (Elixir) -
were put code want run when application/api starts in vanilla phoenix application? let's want make sure mnesia tables created or configure logger backend. other thing runtime configuration. mention in documentation it's not clear me 1 define/change runtime configuration.
endpoint.ex seems place initial configuration done looking @ docs can't find callback allow me run code once @ startup.
put in application callback module. name of application: lib/my_app.ex in start/2 function. 2nd line of module should have use application.
Comments
Post a Comment