0
0
Fork 0

Add Rake task for generate VAPID key (#4195)

* Add Rake task for generate VAPID key

* edit config/initializers/vapid.rb
This commit is contained in:
Yamagishi Kazutoshi 2017-07-14 19:13:43 +09:00 committed by Eugen Rochko
parent 489d162477
commit 0fa9dd8527
3 changed files with 11 additions and 2 deletions

View file

@ -184,6 +184,15 @@ namespace :mastodon do
end
end
namespace :webpush do
desc 'Generate VAPID key'
task generate_vapid_key: :environment do
vapid_key = Webpush.generate_key
puts "VAPID_PRIVATE_KEY=#{vapid_key.private_key}"
puts "VAPID_PUBLIC_KEY=#{vapid_key.public_key}"
end
end
namespace :maintenance do
desc 'Update counter caches'
task update_counter_caches: :environment do