Python知識(shí)分享網(wǎng) - 專業(yè)的Python學(xué)習(xí)網(wǎng)站 學(xué)Python,上Python222
Node Cookbook, Second Edition PDF 下載
匿名網(wǎng)友發(fā)布于:2023-09-05 11:07:59
(侵權(quán)舉報(bào))
(假如點(diǎn)擊沒反應(yīng),多刷新兩次就OK!)

Node Cookbook, Second Edition PDF 下載   圖1

 

 

資料內(nèi)容:

 

 

general practice to call the server.js file (because the npm start command runs the node
server.js command by default). We could put this new server.js file in a new folder.
It's also a good idea to install and use supervisor. We use npm (the module downloading
and publishing command-line application that ships with Node) to install. On the command-line
utility, we write the following command:
sudo npm -g install supervisor
Essentially, sudo allows administrative privileges for Linux and Mac OS X
systems. If we are using Node on Windows, we can drop the sudo part in
any of our commands.
The supervisor module will conveniently autorestart our server when we save our changes.
To kick things off, we can start our server.js file with the supervisor module by
executing the following command:
supervisor server.js
For more on possible arguments and the configuration of supervisor,
check out https://github.com/isaacs/node-supervisor.