Versione 1.0.21 - RIS ITALIA
This commit is contained in:
@@ -4304,5 +4304,20 @@ module.exports = {
|
||||
}
|
||||
|
||||
},
|
||||
generateVapiKey() {
|
||||
const webpush = require('web-push');
|
||||
|
||||
const vapidKeys = webpush.generateVAPIDKeys();
|
||||
|
||||
const msg1 = 'VAPID Public Key:' + vapidKeys.publicKey;
|
||||
const msg2 = 'VAPID Private Key:' + vapidKeys.privateKey;
|
||||
|
||||
|
||||
console.log(msg1);
|
||||
console.log(msg2);
|
||||
return { msg: msg1 + ' ' + msg2 };
|
||||
},
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user