web-push icon indicating copy to clipboard operation
web-push copied to clipboard

Add support for multiple WebPush instances

Open WeeJeWel opened this issue 1 year ago • 2 comments
trafficstars

This is a feature requests for a class-based update of this amazing library.

For example:

import { WebPush } from 'web-push';

const webPush = new WebPush();
webpush.setVapidDetails(...);
webpush.sendNotification(...);

This will allow for using multiple credentials in a single Node.js server. It also feels like cleaner code in my opinion.

WeeJeWel avatar Jan 06 '24 12:01 WeeJeWel