DEV Community

Discussion on: What's the best way to store data for my very basic app?

Collapse
 
deciduously profile image
Ben Lovy

I'm far from an expert here, but I think the simplest solution is, as you say, to build a small backend. Java does seem like overkill for this to me, but if it's what you know that might be the best option. Otherwise I'd check out Flask for Python or Express for Node.js. Both will allow you to keep the backend incredibly simple but still allow FS access. You'd be marshaling data across the boundary likely via API endpoints.

If what you're storing can be represented as key/value pairs, you could see if the Web Storage API could work, but I think that classifies as "abuse" :)

I solved this problem once by using file-type input elements to import data and octet-stream download links with the full content in base64 string form in the link itself to get data back out. I do not recommend this.

Collapse
 
smh30 profile image
Stephanie Hope

Thanks! I do know a tiny bit of Python so I'll try taking a look at Flask!