Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple WebPush instances #876

Open
WeeJeWel opened this issue Jan 6, 2024 · 2 comments · May be fixed by #889
Open

Add support for multiple WebPush instances #876

WeeJeWel opened this issue Jan 6, 2024 · 2 comments · May be fixed by #889

Comments

@WeeJeWel
Copy link

WeeJeWel commented Jan 6, 2024

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.

@lokshunhung lokshunhung linked a pull request Feb 20, 2024 that will close this issue
@lokshunhung
Copy link

@WeeJeWel I made some minimal changes to allow that in #889

@WeeJeWel
Copy link
Author

Very nice! 🙌🏻

@nikeee nikeee mentioned this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants