Comment

Comment by simonfan

Hey everyone,

we've built an offline (highly experimental) version of our code editor on top of Service Workers and IndexedDB.

Basically, the service worker intercepts all requests for /preview//*, fetches files from the IndexedDB and passes them through a series of express.js middleware, everything inside the browser. Live code inspection is enabled via window + service messaging.

The most interesting concept in this project was to bring some server-side logic into the browser, specifically into the service worker, e.g. running css-autoprefixer through all CSS code before serving it.

Works on Chrome and FF.

parent simonfan 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton