Skip to content

Instantly share code, notes, and snippets.

View farooqch11's full-sized avatar
💻
StackWorx.co

Farooq Ch farooqch11

💻
StackWorx.co
View GitHub Profile
@farooqch11
farooqch11 / 01_sidekiq_upstart.config
Last active December 18, 2019 12:00 — forked from ctrlaltdylan/01_sidekiq_upstart.config
EBextension for starting Sidekiq Process on Elasticbeanstalk
files:
"/opt/elasticbeanstalk/support/conf/sidekiq.conf":
mode: "000755"
content: |
description "Elastic Beanstalk Sidekiq Upstart Manager"
start on runlevel [2345]
stop on runlevel [06]
# explained above
respawn

Realtime Notifications with ActionCable

In this episode we're going to be adding realtime notifications into your app using ActionCable. We've talked about notifications a few times in the past and we used AJAX polling for that. 95% of the time, polling is the solution that would be recommended for it.

But if you're looking for a good introduction into ActionCable then this is a decent one because we're only really using it for one way from the server side to the client side.

Getting started

So to get started we're starting with an app that has Bootstrap installed and then we created a Main controller with an index view which is where we will list our Notifications as for this example.

Before we generate our channels let's install a few things