Comments (19)
example pm2 configuration:
echo.json:
{
"name": "echo",
"script": "laravel-echo-server",
"args": "start"
}
command:
pm2 start echo.json
from laravel-echo-server.
Here's a copy of the supervisor config file I have for my echo server for a rough guideline (on a vagrant machine)
[program:echo-server]
directory=/home/vagrant/path/to/your/project
command=/usr/bin/laravel-echo-server start
autostart=true
autorestart=true
user=vagrant
redirect_stderr=true
stdout_logfile=/home/vagrant/path/to/your/project/storage/logs/echoserver.log
from laravel-echo-server.
Systemd unit:
[Unit]
Description=Start a laravel-echo-server
After=network.target
[Service]
User=USER
Group=GROUP
WorkingDirectory=/var/lib/html/project
ExecStart=/usr/bin/laravel-echo-server start
Restart=on-failure
[Install]
WantedBy=multi-user.target
from laravel-echo-server.
I cant set PM2 (2.6.1) on Windows 7 with Node v8.1.4
PM2 Log:
C:\USERS\WALTER\APPDATA\ROAMING\NPM\LARAVEL-ECHO-SERVER.CMD:1
(function (exports, require, module, __filename, __dirname) { @if EXIST "%~dp0\node.exe" (
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Object. (C:\Users\Walter\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:70:21)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
I'll try to run laravel-echo-server from a .bat and start the .bat with the Windows task scheduler or try to make work Supervisord on Windows creating a service with cygwin and python.. :/
from laravel-echo-server.
You can also just restart with supervisor. Don't know if there is a 'graceful' restart, but with the latest echo, the clients should just reconnect when the server is back.
from laravel-echo-server.
I'm running it with supervisor right now. Working perfectly for me, on my production server I've done the same except I had to use an absolute path to node
in order to get the global installation of this package to fire up properly but it works great now.
from laravel-echo-server.
@pfeiferchristopher Thank You, I Will Try It With Supervisor
from laravel-echo-server.
@andkom Just to clarify though, using PM2 doesn't help with regard restarting the process if it exits? You'd still need supervisor/upstart etc?
from laravel-echo-server.
Is there a way to kill/restart the Laravel Echo Server when/if a new configuration goes live? This would be something akin to how Laravel allows you to restart your queue workers: php artisan queue:restart
from laravel-echo-server.
Does no one ever need to restart their Echo server?
from laravel-echo-server.
pm2 restart echo
will restart echo process
from laravel-echo-server.
Thanks, @barryvdh. I finally had time to look into that. I probably should have looked there first.
from laravel-echo-server.
@andkom How to call with config file laravel-echo-server.json
from laravel-echo-server.
That json config file it will be loaded by default. You need to run the server in the directory where the config file is placed
from laravel-echo-server.
Node: v8.9.1
Npm: 5.5.1
Win10
from laravel-echo-server.
@jartaud tell me if you can run the daemon with this https://github.com/coreybutler/node-windows
from laravel-echo-server.
Same as @wa05
why
from laravel-echo-server.
Finally Im running it with windows task manager..
from laravel-echo-server.
You can also just restart with supervisor. Don't know if there is a 'graceful' restart, but with the latest echo, the clients should just reconnect when the server is back.
Hey Barry if you don't mind its little bit late but i was asking i want to start laravel-echo-server but i have dist folder after running npm build which includes index.html file how can start this
from laravel-echo-server.
Related Issues (20)
- Is the package compromised? HOT 6
- Laravel-echo-server events listeners custom callbacks
- Redis6 ACL Support HOT 1
- 运行一会,就会中断,提示截图显示的错误 HOT 2
- Cannot find module '../dist/cli' - supervisord
- Redis 6 ACL config HOT 1
- Connection refused on docker
- Laravel Echo Server work and client side error only at server HOT 2
- Is there ways to emit data from client (socket.io-client) to laravel-echo-server? HOT 2
- Laravel Echo PresenceChannel vs listen events doesn't work HOT 2
- 使用Laravel 5.8 广播系统,本地研发没有事情,上线后握手阶段,第一次OK,第二次报502,第三次报session id unknown,现在不知道是那个地方出问题了?求帮助 HOT 1
- Is `tlaverdure/laravel-echo-server` abandoned? HOT 6
- Is the cors configuration even working? HOT 1
- echo server socket.io.js error
- support redis cluster
- Redis TTL key is store forever
- CSRF token mismatch after session timeout
- npx laravel-echo-server start HOT 1
- Unable to join channel. Member data for presence channel missing HOT 1
- Is this project compatible with Socket.io v4? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-echo-server.