Run obsJS without any (local) server?

Hello everybody,

I am using ojs and observable plot embedded in a revealjs slide presentation which is rendered by quarto.

My goal was to create a standalone HTML slide show with all dependencies either loaded from the web dynamically or embedded in the HTML file, which for the most part works just fine. But when I use this option in revealjs, I get a notification, that ojs needs to be run on a server to work.

Is there a way to run ojs in the browser without a server? I thought the idea of JavaScript is, that it runs on the client, not the server?

My goal is, that I can share the file with the interactive data visualizations with my colleagues. I am aware, that I can host the plot at this site, but wanted to explore alternatives first. I apologize, should this be a really stupid newbie question.

I switched from vanilla JS to Observable five years ago precisely because it removed all that boilerplate (no bundling, no hosting concerns) while also offering a superior prototyping experience thanks to its reactive Runtime and UI.

You can remove the UI by sharing your notebook’s embed URL: Embedding / Observable | Observable

Even with client side scripting you still need a server that hosts and serves the files. However, you can download a notebook as an archive and run it locally.

If you’re looking to share a single HTML file check out Printable Notebook / Fabian Iwand | Observable which lets you generate a page that you can then save to disk. Note however that resources are still fetched externally (as is the case with the download option), so it won’t work while offline.