Closed shoxabbos closed 6 years ago
Check Asset, configuration, npm packages. I can not understand anything by your error.
Here is my console conf
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
'controllerMap' => [
'socketio' => [
'class' => \yiicod\socketio\commands\WorkerCommand::class,
'server' => 'd.xcd.uz:1367'
],
],
web config file
'components' => [
'broadcastEvents' => [
'class' => \yiicod\socketio\EventManager::class,
'nsp' => 'some_unique_key',
// Namespaces with events folders
'namespaces' => [
'app\events',
]
],
'broadcastDriver' => [
'class' => \yiicod\socketio\drivers\RedisDriver::class,
'hostname' => 'localhost',
'port' => 6379,
],
]
And I run this command from controller
\yiicod\socketio\Broadcast::emit(\app\events\CountEvent::name(), ['count' => 10]);
I copied all files from the example. What is the problem I do not understand? ((( Please help me 😢😢😢😢
All daemons && workers are works! You can see it here http://prntscr.com/jlg24e
Check this runtime/logs/exceptions.log. I think the problem on the server side. Right now i don't have any other suggestions
one more, if you run daemon and after add event class, then you have to remove all daemons and stop all process and rerun pm2. You should do it every time when you add/update you event classes
I solve it ))
What was the problem?
How to connect to server from browser? here is my code
But I'm getting errors on the console