After an http server module is created and started in node.js, how can it be obtained in future hot configuration?

  node.js, question

Direct x = require (http). createserver. listen, even global variables exist only in that process. Opening node.exe again is a new process, and variables do not exist. Ask once the command line interface is closed, how can I access the context that was started at that time to heat up the X? Can’t restart every time

Global variables exist only in one process inside and cannot be called across processes. If you want to debug, write it directly in js file inside. If it is modified, it can only be restarted. Js is a’ semi-compiled’ language.