-
Notifications
You must be signed in to change notification settings - Fork 41
How to serve a specific static file (not CSS, JS or images) in Phoenix? #155
Copy link
Copy link
Open
Labels
T25mTime Estimate 25 MinutesTime Estimate 25 Minuteschorea tedious but necessary task often paying technical debta tedious but necessary task often paying technical debtdiscussShare your constructive thoughts on how to make progress with this issueShare your constructive thoughts on how to make progress with this issueenhancementNew feature or enhancement of existing functionalityNew feature or enhancement of existing functionalitypriority-1Highest priority issue. This is costing us money every minute that passes.Highest priority issue. This is costing us money every minute that passes.questionA question needs to be answered before progress can be made on this issueA question needs to be answered before progress can be made on this issueresearchResearch required; be specificResearch required; be specifictechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Description
Metadata
Metadata
Assignees
Labels
T25mTime Estimate 25 MinutesTime Estimate 25 Minuteschorea tedious but necessary task often paying technical debta tedious but necessary task often paying technical debtdiscussShare your constructive thoughts on how to make progress with this issueShare your constructive thoughts on how to make progress with this issueenhancementNew feature or enhancement of existing functionalityNew feature or enhancement of existing functionalitypriority-1Highest priority issue. This is costing us money every minute that passes.Highest priority issue. This is costing us money every minute that passes.questionA question needs to be answered before progress can be made on this issueA question needs to be answered before progress can be made on this issueresearchResearch required; be specificResearch required; be specifictechnicalA technical issue that requires understanding of the code, infrastructure or dependenciesA technical issue that requires understanding of the code, infrastructure or dependencies
Type
Projects
StatusShow more project fields
No status
I would like a easy/simple way to serve a static file in a
PhoenixAppe.g: when you need to verify a domain the registrar requires a
.txtfile.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.lockfile from the projectso that I can easily see exactly which version of a dependency is running.
In the past we have served an endpoint that displayed the
Gitversion of the Appthat we could then lookup on
GitHubto determine exactly which version of theAppwas running for debugging purposes.e.g:
router.ex#L104-L106andcontrollers/github_version_controller.exProblem is: I don't think the
Githistory is available onFly.io(it wasn't onHeroku...)So I think the easiest thing is to serve a
staticfile. 📁Very grateful for any insight other people using
Phoenixhave on this. 💭 💬 🙏