Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How would one use this on Heroku? It doesn't support static file transfers allegedly... and per Heroku they require your app server to serve them by default.

https://github.com/heroku/rails_12factor#rails-4-serve-stati...

Any ideas?



You use a rack middleware to handle static files, which is how Rails handles it by default. So, unless I'm completely mistaken (which I may well be), this should work just fine?


Wouldn't that sit behind the app server? (Equally mistaken potential. :)


Using a CDN (Cloudfront, Fastly add-on, ...) is a common choice, as it allows delivering assets from a closer datacenter to the client and removes load from the app server.


Yeah but getting assets to said cdn is annoyingish without having app server origin, I'd argue.


I find the setup pretty simple and convenient if you configure the CDN to fetch the assets from the app (in which the app will need to serve the assets only once for each new release).


It's trivial with Rails, at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: