当前位置: 动力学知识库 > 问答 > 编程问答 >

node.js - VSCode editor - Restart NodeJs server when file is changed

问题描述:

I am using Visual Studio Code as my editor for NodeJS project.

Currently I need to manually restart server when I change files in my project.

Is there any plugin or configuration change in VSCode that can restart NodeJS server automatically when I make change in files.

网友答案:

Use pm2 to watch your code and restart automatically

npm install pm2 -g
npm install pm2

process.json

{
    name        : "App",
    script      : "app.js",
    watch       : true,
}

You can find the demo @ https://github.com/sivasankars/jade-title-rendering

分享给朋友:
您可能感兴趣的文章:
随机阅读: