Where is a Phoenix app's 'main' entry-point function?

Yes this is a recurring problem, see Long, synchronous running code in application initialization

Also, is there really an “owning” process wîth sqlite ? That makes the db vanish on crash I mean.