-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically reloading MM #549
Comments
@alexiri I like it. It would be fairly useful in development. Not sure if it would be useful in production, but it would be nice to work with it. |
This might be useful for development, but would be bad for production in my opinion. Therefore it should definitely be opt-in. I am currently writing a modification tool for the |
@Jopyth I agree, that's why I added a configuration parameter and set it to false by default. |
I think the auto restarting should not be part of MM, for this there are perfect solutions like This can be easily achieved using the socket messages. A PR to accomplish this is welcome. |
I agree, and this is exactly what this commit does. The reload module lets the frontend detect when the backend has restarted and triggers a page reload. I also suggested |
pm2 is now part of the install script. pm2 allows auto restarting. (check the docs of pm2 for more info) |
While developing a module, I wanted to be able to automatically reload the server and the browser when I made changes to the code. This was actually pretty easy to achieve, the changes to the code are really simple: alexiri/MagicMirror@master...alexiri:reload
With that done, you can install supervisor and then just run the app like this:
supervisor -e 'node,js,json,css' serveronly
This currently doesn't do anything with the electron app, but if there's interest in this feature it could be added.
What do you think? Is this feature interesting for anybody else?
The text was updated successfully, but these errors were encountered: