Problems with your own app.js. Is the http service not started in it, or the listening port number is not printed, so the last sentence is not mentioned. Aren’t everything else the same as the textbook?
Supervisor is just a node service, right? It's just that he acts as the main process and sets up a child process as your service so that it can be easily monitored.
Just start it after installation. When you originally wrote node, every time you modified the content of the server, you needed to automatically restart it to take effect. With this superviosr, it will automatically restart the service after you save it. But, what effect do you want? Check to see if the code is correct. It probably has nothing to do with the supervisor.
I seesupervisor是一个调试工具,他会创建一个进程去监听的你程序代码的变更,而不需要每次单独使用nodego execute your code.
Actually, I think there is nothing wrong with your execution method. The so-called different prompt information you see may be caused by the system. Secondly, it is possible that your code and his code are different, so the monitoring results are different.
Although I don’t know much about node, I know that the startup should be node app.js (app is the name of your node program). Anyway, I have never used the supervisor command
Problems with your own app.js. Is the http service not started in it, or the listening port number is not printed, so the last sentence is not mentioned. Aren’t everything else the same as the textbook?
Supervisor is just a node service, right? It's just that he acts as the main process and sets up a child process as your service so that it can be easily monitored.
Just start it after installation. When you originally wrote node, every time you modified the content of the server, you needed to automatically restart it to take effect. With this superviosr, it will automatically restart the service after you save it.
But, what effect do you want? Check to see if the code is correct. It probably has nothing to do with the supervisor.
Usually the command used to execute a js file is
I see
supervisor
是一个调试工具,他会创建一个进程去监听的你程序代码的变更,而不需要每次单独使用node
go execute your code.Actually, I think there is nothing wrong with your execution method. The so-called different prompt information you see may be caused by the system.
Secondly, it is possible that your code and his code are different, so the monitoring results are different.
Put out app.js and take a look.
Although I don’t know much about node, I know that the startup should be node app.js (app is the name of your node program). Anyway, I have never used the supervisor command
Follow your cmd prompts, haven’t you already turned on monitoring?
It is already running. I think you want to see a running prompt. If so, you can add a sentence at the end of
app.js
:app.js
结尾加一句:console.log ('server is running on ort')
console.log ('server is running on ort')
🎜