0.3.0 • Published 8 years ago

node-serviceworker v0.3.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
8 years ago

node-serviceworker

Environment for running serviceworkers in node.js, as 'isomorphic' request handlers for clients without SW support.

Features and status

Based on this task.

  • Registration to a scope. This introduces a very basic routing scope, but finer-grained routing is normally happening inside the service worker.
  • fetch, via https://github.com/gwicke/node-fetch
    • Added ReadableStream support.
    • This also provides a basic Response implementation, wrapping the node HTTP response object.
  • Request wrapper for Node's IncomingMessage.
  • Cache. On the server, this is useful for in-process caching of frequently-used fragments.
  • Accept ReadableStream body responses in FetchEvent.respondWith
  • IndexedDB, via https://github.com/dumbmatter/fakeIndexedDB
  • Runs basic sw-toolbox based ServiceWorkers.
  • Periodic ServiceWorker code refreshs.
  • Per-domain configuration support.

Demo

A demo service based on node-serviceworker-proxy is running at https://swproxy.wmflabs.org/wiki/Foobar. This is serving a demo streaming serviceworker, which composes templates and streamed HTML content using web-stream-util and web-html-stream.

TODO

  • More closely implement WorkerGlobalScope. Roughly in order of importance:
    • console has a lot more methods in browsers than in node
    • location: done
    • performance object: Lots missing.
    • navigator object: Partly done, but more to do.
0.3.0

8 years ago

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago