Push Notification Service - Heroku App Setting

in blurt •  4 years ago 

Push notification service was up and down, and up again.

I need to forget one setup for proper push service.

The push service for the mobile app is a worker app, which parses Blurt block data and then sends push notifications.

Currently, the push service is on Heroku app.

I thought it is a worker app because I set the worker mode in the CLI. But in Heroku, the app is executed in a web app, which is the other type of app in Heroku.

I had to turn off the web app setting like this;
image.png

The commands for the two types of apps are different:

$ npm start // for web apps

$ node index.js // for worker apps

Click the pencil icon to turn on/off the feature.
If both are turned on, heroku, I guess, randomly selects one the mode.

The colors of logs are distinguishable.

image.png

As you can see, it is the worker app!

Hope that the push service never dies!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  
  ·  4 years ago  ·  

I had a worker service running on heroku as well. It didn't consume the free dynos allocated to it for one month. 24 hours x 30 days is 720 hours. Heroku has 1000 free dyno hours.

Good job as always.

  ·  4 years ago  ·  

yes. the push service is within the free hours. thanks!

So the heroku can get painfully expensive over time,.

Would you like us to host this for you somewhere?

  ·  4 years ago  ·  

Wow thanks!

it is simple codes for now so it can be within the free service. I guess a rpi is able to handle this with proper router setup.

Although Heroku might be expensive, it is so convenient to do this task.