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?
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.
Previous: The problem of weblogic receiving message parsing message?
Next: What are the ways to decode and play audio stream (MediaStream) with js?
var http = require("http") var server = http.createServer(function(req,res){ console.log("jirengu") res.setHeader("Content-Type","text plain";"charset=gbk") res.write( <h1>jirengu<...
sincerely ask for advice: < hr > I want to use node as the background to build a video streaming server. The front end is similar to Youku VOD. It can record the playback node function, and load the progress bar at any point (starting from the c...
suppose there are only a.js and b.js (only two js and nothing else) b.js export A variable is used for a.js can you directly use import and export without using packaging and compilation tools such as webpack or babel can it be achieved with the h...
do the gods have plug-ins for uploading attachments in the mobile version that can also be uploaded more than one? ...
1. Notes printed by Bluetooth printer are garbled in Chinese 2. 3. ...
var http = require("http") var server = http.createServer(function(req,res){ console.log("hello") console.log(2222) res.setHeader("Content-Type","text html","charset=gbk") res.write( <...
...
adopt a reward of 10 yuan, 1045 Access denied for user root @ localhost (using password:NO) recently, when I was at the front end of my self-study, I came into contact with a little bit of database. This happened when I made a new connection on ...
I can run before packaging without any error reports. This problem occurs after packaging. reports such an error in the browser, using scaffolding made by create-react-app, and the back end is Node.js, backend. No error is reported: packages two diff...
my page uses the views layouts index.hbs template, in which there are three links corresponding to three pages. The question now is: how can I get the current path, because I want to set the active class name to the corresponding link according to t...
I ve been looking for it for a long time, but I can t find it. 1. After the direct upload of web is completed, the server cannot know whether the file was uploaded successfully, who uploaded it, and the information of the file 2. Using web to dire...
you need to build a http service with nodejs, but the service has scheduled tasks to handle. it seems impossible to use native http server. Is there any way to do it? Or other modules? ...
In the scenario, the front end uploads the file to node api,api through xhr and calls the upload method put of Aliyun oss sdk (or multipart), Aliyun is responsible for uploading the file to oss.. Well, the problem is that when the front end monitors the...
for example, I request localhost:8080 a b c.cd proxy to http: www.aaaa.com api can you change a b c.cd to a b c , before proxy? means that the agent rewrites the original path before. ...
Please recommend the library reported by error monitoring at the front end, or post relevant codes the discovery written by myself is not comprehensive, unable to listen for resource errors, but can only listen for run-time errors. I don t know if th...
in the development of the ElementUI+Express project, uploading pictures encountered this problem: 1ElementUI: <el-upload action="http: localhost goods addNewGoodsPicture" :limit="1" :onError="uploadError" :onSuccess=&q...
var myNumber = { value: 1, add: function(i){ var helper = function(i){ console.log(this); this.value += i; } helper(i); } } myNumber.add(1); Why does this this point to window?? The add method called by the myNumber o...
this visual studio code has inexplicably linked more than 5,000 files after I built a project inexplicably, which may be related to GitHub. excuse me, how did this happen? how can I fix it? every time I open it, I feel so unhappy Thank you! ...
1. Execute npm install-g pm2 2.pm2 pm2 start app.js pm2 3.ln -s root myapp pm2 usr local bin still failed to solve the problem messed up for a long time because no soft connection was created. ln -s root node-v8.9.0-linux-x64 lib node_...
like this [array [xxx], array [xxx], array [xxx].] merge all xxx in array into one array [xxx.] ...