A few requests should randomly fail to force the developer to think about handling errors. :)
Hah! I'm not sure my MVP has ever had error handling beyond "Something went wrong.". That's something for a real production app, not the minimum possible product.
Show HN: Caffeine – Minimum viable back end for prototyping
31–40 of 83 posts
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#32Like the idea. Any user auth? I wonder if parse is still around and supported? I thought that was pretty good for this kinda thing.
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#33A very basic REST service for JSON data - enough for prototyping and MVPs! Features: no need to set up a database, all data is managed automagically* REST paradigm CRUD for multiple entities/namespaces schema validation search using jq like syntax CORS enabled easy to deploy as container
Just a heads-up, you might want to take down the example website. Now that it's been posted to HN you might see malicious actors. I also think it's prone to SQL injection at the moment? At least, it's raising a syntax error when inputting an apostrophe.
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#34FYI, there is a name clash with Caffeine, a Mac OS menu bar app that keeps the screen awake: https://intelliscapesolutions.com/apps/caffeine . But I guess this is expected with a name like this, and the scopes of the projects are clearly different, so this should be relatively harmless.
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#35This is useful. But you can achieve the same results in just a few more steps with Hasura or Supabase and end up with something that is close to production ready.
If I read it right, you don‘t need to configure any schema to use this? You can just POST a user and it will create that type? If it‘s true, that‘s a real step above hasura/supabase for rapid prototyping.
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#36Why do people overload common nouns so much when naming a project? A name should confer its essence.
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#37Re: Show HN: Caffeine – Minimum viable back end for prototyping
#38Like the idea. Any user auth? I wonder if parse is still around and supported? I thought that was pretty good for this kinda thing.
Parse is still around and supported: https://github.com/parse-community/parse-server
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#39Feature request: supply .json file via command line to pre-load data into the in-memory database. Taking it even further; how about persisting the data in the file? Sometimes your prototype will need some pre-added data so I think this might be useful.
It's more complex than Caffeine, but it has a lot of options.
It can also run as a proxy and generate the mocks from actual http requests passing through the proxy
Re: Show HN: Caffeine – Minimum viable back end for prototyping
#40A very basic REST service for JSON data - enough for prototyping and MVPs! Features: no need to set up a database, all data is managed automagically* REST paradigm CRUD for multiple entities/namespaces schema validation search using jq like syntax CORS enabled easy to deploy as container
Just a heads-up, you might want to take down the example website. Now that it's been posted to HN you might see malicious actors. I also think it's prone to SQL injection at the moment? At least, it's raising a syntax error when inputting an apostrophe.
https://github.com/rehacktive/caffeine/blob/master/database/...
"INSERT INTO %v (id, data) VALUES('%v','%v') ON CONFLICT (id) DO UPDATE SET data = '%v'"
Use prepared statements and parameters passed to the db driver, not building strings with strings or you are vulnerable to sqli.
I'd also avoid using %v anyway when building strings - safer to use a specific type like %d for int.