https://github.com/nimblehq/action-cable-and-web-push-notification
A sample project using Action Cable in a Rails Project
https://github.com/nimblehq/action-cable-and-web-push-notification
action-cable firebase javascript push-notifications rails ruby service-worker socker
Last synced: 7 months ago
JSON representation
A sample project using Action Cable in a Rails Project
- Host: GitHub
- URL: https://github.com/nimblehq/action-cable-and-web-push-notification
- Owner: nimblehq
- Created: 2017-03-03T09:18:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-16T03:50:26.000Z (about 7 years ago)
- Last Synced: 2025-01-20T14:34:20.763Z (9 months ago)
- Topics: action-cable, firebase, javascript, push-notifications, rails, ruby, service-worker, socker
- Language: Ruby
- Homepage:
- Size: 86.9 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Websocket and Web Push notification
An Rails example app using Action Cable and Service Worker (Web Push Notification)
Live demo available: https://question-answer-nimbl3-growth.herokuapp.com/
## Technicals ##
- Action Cable
- Service Worker - Web push notification
- Firebase clound message## Usage
### Step 1
Create a new project on Firebase at https://console.firebase.google.com/
Get `Server key` and `Sender ID` for `Firebase cloud messaging` at https://console.firebase.google.com/project/qa-nimbl3-growth/settings/cloudmessaging
### Step 2
Clone the repository
`git clone git@github.com:nimbl3/action-cable-and-web-push-notification.git`
### Step 3
Edit file `public/manifest.json`, change `gcm_sender_id` to your `Sender ID` above
```
# public/manifest.json{
"gcm_sender_id":
}```
Edit file `config/application.yml`
- Change `FIRE_BASE_API_KEY` to `your server key`
- Change `DB_HOST` to `your database host`
- Change `DB_PORT` to `your database port`
- Change `USERNAME` to `your database username`
- Change `FIRE_BASE_API_KEY` to `your server key````
# config/application.ymldevelopment:
DB_HOST: "192.168.99.100"
DB_PORT: "5432"
USERNAME: "postgres"
FIRE_BASE_API_KEY: 'YOUR_SERVER_KEY'
```### Step 4
```
rake db:setup
rails server```
## License
This project is Copyright (c) 2014-2018 Nimbl3 Ltd. It is free software,
and may be redistributed under the terms specified in the [LICENSE] file.[LICENSE]: /LICENSE
## About

This project is maintained and funded by Nimbl3 Ltd.
We love open source and do our part in sharing our work with the community!
See [our other projects][community] or [hire our team][hire] to help build your product.[community]: https://nimbl3.github.io/
[hire]: https://nimbl3.com/