Home > front end >  Command Line Nodemon
Command Line Nodemon

Time:09-04

Originally, I was developing my backend for my project, but now I want to start developing the front-end so I put all my documents for my backend into a folder called "server". However, I used to run the application using nodemon index.js but because it is in a folder now, this won't run. I am not sure how to access it and make it run.

The folder structure is below: Application |--- Server(folder) |-- index.js |-- package.json

In VScode, my terminal is the following

name@MacBook-Pro Project-Application--main % 

CodePudding user response:

update the command with new path

nodemon Server/index.js

if you want nodemon to restart if only files change in Server folder, create a nodemon.json in the same folder as package.json

{
  "watch": [
    "Server/"
  ]
}
  • Related