Rowadz / caskbrewer

A react component that serves and run a static website in an iframe from a zip file without a server

Home Page:https://rowadz.github.io/caskbrewer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to caskbrewer

This is a demo for this video

This is a react component that will serves and runs a static website only from a .zip file, by only using some web APIs like

and some other packages:

What happens

  • We load a .zip file from the backend
  • This .zip file contains a static website (.html, .js, .css) files
  • After loading the .zip file, we extract the content
  • we use Iframes for the .html files
  • we inline the link tags (we get the CSS code from the .zip file and inline them)
  • we use the Blob API with URL.createObjectURL() to create linkable JS scritps from the .zip file

DEMO

See this demo of this code

https://rowadz.github.io/caskbrewer/

look at the network tab and the DOM

About

A react component that serves and run a static website in an iframe from a zip file without a server

https://rowadz.github.io/caskbrewer/


Languages

Language:JavaScript 86.6%Language:HTML 13.4%