项目作者: pjsier

项目描述 :
Cloudflare Worker for subscribing to a browser push notification when an HTML page's content changes
高级语言: Rust
项目地址: git://github.com/pjsier/push-page-diff.git
创建时间: 2021-01-02T00:02:51Z
项目社区:https://github.com/pjsier/push-page-diff

开源协议:MIT License

下载


Page Diff Push Notifications

Build status

Cloudflare Worker for subscribing to a browser push notification when an HTML page’s content changes. You can see the live version at push-page-diff.pjsier.workers.dev.

Includes workarounds for customizing a webpack build in a Cloudflare Worker using Rust. Also includes a WASM-compatible setup for web push authentication and encryption.

Setup

You’ll need Rust, node.js, and wrangler installed. You’ll need to replace the account-specific values in wrangler.toml with your own. Install dependencies with:

  1. npm install

Then you’ll need to generate keys for VAPID authentication by running:

  1. npm run keys

Then copy .env.sample to .env and fill in the output values for VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY. VAPID_SUBJECT should be a mailto: link to an email of your choice.

Run the worker locally at localhost:8787 with:

  1. wrangler dev