ericclemmons / start-server-webpack-plugin

Automatically start your server once Webpack's build completes.
MIT License
158 stars 26 forks source link

Add the ability to manually restart the server by typing rs #18

Closed tikotzky closed 6 years ago

tikotzky commented 6 years ago

This is similiar to nodemon. It's needed if you want to restart the server when making external changes (i.e. changing env variables)

I didn't add any tests because I wasn't sure how to test it :)

What I did is... 1) Extract the actual starting of the server to its own "private" method. 2) add a listener to stdin, kill the current worker and start the server again if the user types rs

Currently the implementation allows the user to disable this behavior by passing restartable: false.

tikotzky commented 6 years ago

This is also useful in the case where webpack was not able to hot load the changes and the app needs to be restarted...

wmertens commented 6 years ago

Thank you!

tikotzky commented 6 years ago

awesome thanks!

Looks like the auto deploy from travis is failing though... Would you be able to do a manual release?

wmertens commented 6 years ago

I will try.

On Sun, Mar 4, 2018, 10:51 PM Mordy Tikotzky, notifications@github.com wrote:

awesome thanks!

Looks like the auto deploy from travis is failing though... Would you be able to do a manual release?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/ericclemmons/start-server-webpack-plugin/pull/18#issuecomment-370267443, or mute the thread https://github.com/notifications/unsubscribe-auth/AADWloaqUQN8zhLfWDS6Y6o1xQw9VtOAks5tbGHngaJpZM4SHMOO .