Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Publish to fully static website #1662

Closed
contrun opened this issue Mar 16, 2022 · 1 comment
Closed

[feature request] Publish to fully static website #1662

contrun opened this issue Mar 16, 2022 · 1 comment

Comments

@contrun
Copy link

contrun commented Mar 16, 2022

It seems currently all datasette publish requires a real backend server which is able to query the database and send results back to the frontend. There are a few projects to on-demand download a portion of data from the database from a sqlite lite database url, and present it directly to the user. These methods leverages web assembly under the hood. I think datasette is a perfect use case for this technology. Below are a few examples of querying sqlite database from frontend directly.

@simonw
Copy link
Owner

simonw commented Mar 19, 2022

Those client-side SQLite tricks are really neat.

datasette publish defaults to configuring it so the raw SQLite database can be downloaded from /fixtures.db - and this issue updated it to be served with a CORS header that would allow client-side scripts to load the file:

If you're not going to run any server-side code at all you don't need Datasette for this - you can upload the SQLite database file to any static hosting with CORS headers and load it into the client that way.

In terms of static publishing, I do think there's something interesting about using Datasette to generate static sites. There's an issue discussing options for that over here:

@simonw simonw closed this as completed Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants