Is there a way to develop locally with a dev uplink key, then take the same app and push it to a staging url, then test it, then if it’s good promote the same packaged code to production?
I don’t love having the prod key lying around on my local box, and need to test the app before putting it in front of users.
I suppose if you had dns that was lightning fast like cloudflare it could work if you changed the cname for staging to each new “preview” app if they have unique hostmames ( I think they do ), then test it, then swap the prod cname to the preview app cname.
This raises an interesting question - are the preview environments as scalable as the designated prod environments?
I still don’t get warm fuzzies moving this task to dns but it may be good enough.
But if you’re using fly.io for prerendering some urls, you’d have to change all those too. Pretty open invitation for human mistakes there. Could fix that by automating it with cloudflare and fly APIs I suppose.
If ( when ) a user has a dns cache disrespect the ttl, the userbase would be using different endpoints.
It raises another interesting question - are schemes and data transferred on preview environment creation and as such immutable, or shared and mutable. If shared and mutable, this approach would be a data consistency disaster.
Looking into it a bit more, this makes it sound like dns ttl’s don’t matter with cloudflare. One of their customers proposes the “promote test domain to production” pattern.