In this example, we lean how to get real time active users in mobile app or web application using nodejs socket.io.
Sometime, we require to make functionality to get real time online users counter on your admin panel. We can easily do it using node js and socket io. I give you very simple example for real time online users counter that way you can simply use in your PHP project or any other language project. I created two files for this example as listed bellow:
First file is index.html, in this file we can run on browser and see .....
Today, i am going to show you how to authenticate user node js using JWT and socket io in Laravel 5.3. It is very very important because if you are working with chat application or messengers system etc with user then you have to use JWT token because it is very safe and secure way.
If we work on chat module with socket io but someone can easily hack our code. At that time we require to check given JWT token is valid or not using <strong class="path">socketio-jwt</strong> package of Node.
socketio-jwt package thorough we can simply authentication with user and identify that token is valid .....
In this tutorial, i going to show you how to make real time chat message module using socket.io, redis, express and nodejs in Laravel 5. socket.io through we can make real time chat module in our Laravel 5 application. i show you from scratch because you can install nodejs and its packages etc. in this post you can undestand and learn step by istalling and how to write code. You have to follow the step and implement real time chat module in your application. So basically you can see bellow preview of our chat message module.
<img width="100%" src="/upload/socketio.png.....