logoalt Hacker News

anitiltoday at 2:11 AM4 repliesview on HN

When I've needed something like this in the past I've spun up simple HTML pages and used the json endpoint that all datasette instances come with [0]. I like this new pattern much better, as it keeps your app and data in one place (I remember having some issue with this at the time, though I can't remember what the actual issue was)

So I imagine we could now load some data in to sqlite, design some HTML also loaded in to the db, and deploy. Although looking at the source, it seems like stored apps are expected to be managed by the plugin itself, but I'm sure there's a way around that

[0] Eg from one of the examples - https://datasette.io/legislators/-/query.json?sql=select+*+f... . If you strip the '.json' you get the html view. For what it's worth there's also a '.csv' version.


Replies

simonwtoday at 4:30 AM

I'm going to think about how Datasette Apps can work with the apps themselves stored on a filesystem so they can be revision controlled using Git.

I have an idea for a way to edit them through Datasette and have them backed up to Git via a separate mechanism, but having them on disk would be a whole lot more convenient.

Filed an issue here: https://github.com/datasette/datasette-apps/issues/30

show 1 reply
e12etoday at 11:42 AM

> it keeps your app and data in one place (I remember having some issue with this at the time, though I can't remember what the actual issue was)

CORS headers?

Talpur1today at 11:06 AM

This seems to attractive side of seeing it, however the striping Json would not be suitable i believe

Talpur1today at 11:04 AM

[flagged]