It collects the Canada IRCC's Express Entry rounds automatically. Users can subscribe to the notifications for the newer rounds. Whenever it has a newer round, it will use HTTP/2 Server Push to push the message. The user's browser's service worker will listen to the push messages and show the notification on their devices.
- install Homebrew https://brew.sh/
- install rbenv https://github.com/rbenv/rbenv?tab=readme-ov-file#homebrew with homebrew
- after install rbenv, execute
rbenv install 3.1.2
to install ruby 3.1.2
- go to the project directory
- execute
bundle install
- execute
rm config/credentials.yml.enc
- execute
EDITOR=vim rails credentials:edit
and then save and quit - run
bundle exec rails c
to open the Rails Console - In the Rails Console, run
vapid_key = WebPush.generate_key
- check the values of
vapid_key.public_key
andvapid_key.private_key
- execute
EDITOR=vim rails credentials:edit
again, edit it like below then save
secret_key_base: a secret
webpush:
public_key: vapid_key.public_key you saw in the previous step
private_key: vapid_key.private_key you saw in the previous step
- initialize database byt running
bundle exec rails db:create db:migrate db:seed
- execute
rails s
- open a new tab in terminal and execute
bin/vite dev
- open 'localhost:3000' in the browser