Why is it necessary to disconnect and reconnect the server if the nodejs code is changed?

Why is it necessary to disconnect and reconnect the server if the nodejs code is changed?

Feb.27,2021

is not necessary. You can install a PM2, that automatically restarts node, without manual refresh every time it modifies the code. It is almost the same as the front-end hot mix


nodemon this package can be hot updated


because changed the code total ah, disconnection is to re-parse and execute, you can use nodemon and other tools to allow the parser to re-parse the changed code.

Menu