Skip to content

Instantly share code, notes, and snippets.

@justindarc
Created March 29, 2016 19:45
Show Gist options
  • Save justindarc/cde5c8906aa73fa573a0882853b97994 to your computer and use it in GitHub Desktop.
Save justindarc/cde5c8906aa73fa573a0882853b97994 to your computer and use it in GitHub Desktop.
hello-flyweb.js
navigator.publishServer('HelloFlyWeb').then((srv) => {
(window.srv = srv).onfetch = (evt) => {
evt.respondWith(new Response('<h1>Hello FlyWeb!!!</h1>', {
headers: { 'Content-Type': 'text/html' }
}));
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment