3 ms·
Integrating live code editors within docs and tutorials is great. Another example of this I saw recently using SQLite (compiled to Wasm) in the browser: https:
by refset 2y ago
Integrating live code editors within docs and tutorials is great.
Another example of this I saw recently using SQLite (compiled to Wasm) in the browser: https://docs.sqlitecloud.io/docs/sqlite https://docs.sqlitecloud.io/docs/sqlite
And if you ever want something similar for more general backend APIs (without relying on Wasm or the browser to run the software), https://codapi.org/ https://codapi.org/ looks very slick e.g. as demonstrated in https://antonz.org/sql-upsert/ https://antonz.org/sql-upsert/ - discussed on HN previously [0]
Inspired by https://www.db-fiddle.com/ https://www.db-fiddle.com/ my colleagues ended up building a fairly bespoke setup for XTDB's docs (XTDB doesn't yet compile to Wasm) shortly before I came across Codapi, although our requirements were even more particular, e.g. see https://docs.xtdb.com/tutorials/financial-usecase/time-in-finance.html https://docs.xtdb.com/tutorials/financial-usecase/time-in-fi... - the backend here is https://github.com/xtdb/xt-fiddle https://github.com/xtdb/xt-fiddle which runs purely on top of Lambda Snapstart, and embedded within docs based on Astro's Starlight [1] and Web Components
[0] https://news.ycombinator.com/item?id=38663717 https://news.ycombinator.com/item?id=38663717
[1] https://starlight.astro.build/ https://starlight.astro.build/