node.js - What is the difference between npm run dev and using virtual host configuration?
怪我咯
怪我咯 2017-05-16 13:24:12
0
1
568

Executing npm run dev in the directory where package.json is located will start localhost:8080. After being modified by the watch file, it will automatically recompile and refresh the browser.

At this time, use nginx to configure a virtual host (such as app.dev) to point to this directory, update some files, and trigger recompilation. localhost:8080 The page accessed by the port will be modified synchronously, and app.dev The page you visit is still the same as before the modification.

Why is this?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
我想大声告诉你

The service started in npm run dev mode accesses the content in the cache after compilation. The compiled content is not synchronized to the hard disk.
When accessed through nginx, files on the hard disk are accessed, so app.dev 访问的页面还是修改前的样子

will appear
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template