Live data from Hacker News

You can serve static data over HTTP

ignore.pl

1–10 of 127 posts

Re: You can serve static data over HTTP

#2
Thanks, I think I can actually apply this idea actually. I'm writing a chat app for fun and one of the (admittedly small) issues I'm dealing with is cleanly storing the local state of the chat so that it appears correctly on refresh. There's some complexity involved with how messages are served, received, etc. with notifications, dings, animations, whatever -- but maybe saving that information to a file (as an alternative to localStorage or database read) could be a robust alternative to whatever I was trying to do. I'll give it a try.

Re: You can serve static data over HTTP

#5
Rails, by default, will put a “.json” suffix on json routes. This is so supremely useful if you have a Rails api app, speaking to some over complicated front end that might need a quick and dirty mock for something. Just serve your /api/thing.json from somewhere. Only issue is with HTTP verbs other than GET, but usually at that point I need a lot more than this 15second mock. Good for testing little things though.

Re: You can serve static data over HTTP

#6
Not from a modern developer. You need to jump down the rabbit hole of the history of solid and proven solutions.

Indeed. I've noticed an increasing number of people who call themselves "developers" and appear to create software, but all they can do is follow step-by-step tutorials to glue together some massively bloated thing that they have absolutely no understanding of, much less the skills to debug it when something doesn't work perfectly as expected.

Re: You can serve static data over HTTP

#10

What if the data is dynamic but small and low qps? What are the current easiest projects and services for authed data CRUD? Is firebase still good?

I’ve used it a bit recently and it doesn’t seem terrible!

But only for prototyping and testing the auth and database tools.

Haven’t really made a decision on it vs rolling my own in Rails.

Post reply on HN