为了同步服务器的环境,我使用Vagrant
把文件同步到虚拟机然后在虚拟机运行服务
关于node.js
热加载目前使用PM2
,也可以可以在虚拟机监听同
步后的文件.
但是每修改一次服务器都要重启,而且速度非常慢,这样在开发过程太浪费了.
请问大大们都是如何解决Node.js + Vagrant
这套环境的?
PHPz2017-04-17 15:31:43
Thank you for the invitation.
Shit, I found that I have already answered this question in the comments of the previous question. . .
https://segmentfault.com/q/10...
To sum up, let’s create a self-starting script at boot. After the virtual machine starts, it will run pm2