pusher

Difference between SignalR and Pusher

元气小坏坏 提交于 2019-12-11 16:32:58
问题 I want to create a web app using React as the front end technology. A requirement for the app is that the server will be able to update all the clients with information about changes (not have to be an exact real time, but should update after no more than 10 seconds). Solutions like clients requesting updates from the server every several seconds are out of the question. Requirements: 1) The server's should be implemented with either .NET or with Node.js. 2) The connection MUST be secured via

laravel 5.7 + vue.js 2 + laravel echo + pusher, how to make them work together?

故事扮演 提交于 2019-12-11 15:19:44
问题 I am able to configure Laravel Echo with Pusher and install all the necessary dependencies. I have watch tutorials on lynda and laracast how to do this, but they are old and not for these versions in the title of this question. So, from what i have learned so far from lynda and laracast i have to run Vue from the blade template, but i cant make this work unless i add manual this line of code <script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script> inside my blade engine. i

Pusher\Exception\HttpException Bad request

萝らか妹 提交于 2019-12-11 15:09:15
问题 laravel- 5.6 Php - 7.2 pusher - 3.0 when try to connect with pusher: 回答1: You should provide more details to your question so others have a better picture of what might cause the problem. But I ran into the exact same problem recently and might be able to help. In my instance, this problem is caused by composer pulling in pusher dev-lib instead of published version when I run composer require pusher/pusher-php-server "~3.0" . It happens because I don't have php-curl installed in my setup.

Laravel Echo presence channel not working well with vue router

回眸只為那壹抹淺笑 提交于 2019-12-11 09:55:24
问题 The app is a chat app, using laravel and Vue, once a user logs in he sees the list of all online users, I called the Echo wrapper in the mounted component of the home page to show all online users, it works and shows them, the issue now is if I go to another page (via Vue Router) and then comeback to the home page it doesn't show the list of online users... Except manually i refresh the page again. Below is a snippet of my code: mounted () { // alert('Shoud work') // console.log(Echo) Echo

Django Channels Background Worker Instances

不打扰是莪最后的温柔 提交于 2019-12-11 08:52:04
问题 I am working on a Django Channels-2 project , where channel layer is used to offload information from browsers to a consumer who analyses it and send the results back to the Browsers via groups mechanism. The data comes from pusher via a pusher-client , and is therefore the same for many client browsers. My first took was to set-up the following infrastructure: layout 1: ( browser1: Pusher-client, websocket; ... browserN: Pusher-client, websocket) <----> WebsocketConsumer (member of group ;

Pusher JS is not working from node JS in some network

跟風遠走 提交于 2019-12-11 07:24:23
问题 I followed the guide of Pusher docs to create a simple example, and the code is copy from the Code examples. This example works well when I'm at home, but it's never working when I'm in office. In office, the HTML page can alert the message when I use the Debug Console provided by Pusher to create new Event. However, the HTML page won't alert any messages when I trigger the event from node JS. I guess the problem is related to the network, so I want to know how to jump over the network

Implementing Pusher chat in Rails

谁说我不能喝 提交于 2019-12-11 06:19:49
问题 Since there is not much up-to-date information with latest versions of Rails and Pusher, how can I implement Pusher in my Rails app to get realtime chat between users? The Pusher documentation shows how to do this with Sinatra, but there isn't anything specific to Rails... 回答1: Create an initializer file app/config/initializers/pusher.rb require 'pusher' Pusher.url = 'your-pusher-url' Pusher.logger = Rails.logger In your controller, lets assume this is for chat messages: app/controllers

Laravel Pusher exception: “Illuminate\Broadcasting\BroadcastException”

老子叫甜甜 提交于 2019-12-11 06:01:14
问题 I get "Illuminate\Broadcasting\BroadcastException" when trying to broadcast event. I've checked my .env file - it's set correctly, I'm on localhost so I set 'encrypted' to false aswell, BroadcastServiceProvider is uncommented. Nothing helps. FULL ERROR IMAGE bootstrap.js import Echo from 'laravel-echo' window.Pusher = require('pusher-js'); window.Echo = new Echo({ broadcaster: 'pusher', key: '***', cluster: 'mt1', encrypted: false }); web.php Route::post('/messages', function() { $user = Auth

PHP Newsfeed with Reload

风流意气都作罢 提交于 2019-12-11 05:49:51
问题 I'm have a PHP and MYSQL based newsfeed. To get new content, the user has to refresh the page. I'm working on a push system that would update the element with new posts without refreshing the whole page. How would I go about that? 回答1: Sounds like a job for Ajax! Also if you want to make the work really easy, use jquery. The Syntax would look something like this: $.ajax({ type: "post", url: "/SomeController/SomeAction", success: function (data, text) { //.... }, error: function (request,

Application crash upon receiving a notification

妖精的绣舞 提交于 2019-12-10 18:35:36
问题 I'm trying to setup a push notification system, to do that, I'm using Firebase Cloud Messaging with Pusher. I followed this tutorial, in order to implement it. When setting up FCM, I was able to send notifications from FCM's dashboard. Then when I setup Pusher, upon receiving a notification, my application crashes. I've checked multiple post on the internet, but I couldn't find any that solved my issue. I've checked multiple times my dependencies in my gradle files. Here is my MainActivity