nodemon not working properly

后端 未结 13 680
长发绾君心
长发绾君心 2021-02-01 05:18

I am running my nodejs app by npm start

I just installed nodemon by sudo npm install -g nodemon so that i can get my server restarted when i s

13条回答
  •  粉色の甜心
    2021-02-01 05:47

    Add following code in your code

    1. app.js

      app.listen(3000, function(){
          console.log("info",'Server is running at port : ' + 3000);
      });
      
    2. package.json

      nodemon app.js 
      

    Then run npm start from the command line.

提交回复
热议问题