I would like a easy/simple way to serve a static file in a Phoenix App
e.g: when you need to verify a domain the registrar requires a .txt file.
This can sometimes be done at the DNS level. But other times it needs to be served by the Application.
My particular use case is the following: I want to serve a copy of the mix.lock file from the project
so that I can easily see exactly which version of a dependency is running.
In the past we have served an endpoint that displayed the Git version of the App
that we could then lookup on GitHub to determine exactly which version of the App was running for debugging purposes.
I would like a easy/simple way to serve a static file in a
Phoenix
App e.g: when you need to verify a domain the registrar requires a.txt
file. This can sometimes be done at the DNS level. But other times it needs to be served by the Application.My particular use case is the following: I want to serve a copy of the
mix.lock
file from the project so that I can easily see exactly which version of a dependency is running.In the past we have served an endpoint that displayed the
Git
version of the App that we could then lookup onGitHub
to determine exactly which version of theApp
was running for debugging purposes.e.g:
router.ex#L104-L106
andcontrollers/github_version_controller.ex
Problem is: I don't think the
Git
history is available onFly.io
(it wasn't onHeroku
...) So I think the easiest thing is to serve astatic
file. 📁Very grateful for any insight other people using
Phoenix
have on this. 💭 💬 🙏