- npm init -y
- Add the "--watch" flag
node --watch index.jsnpm install nodemon
nodemon index.js"scripts": {
"dev": "node --watch index.js",
"start": "nodemon index.js"
},res.setHeader("Access-Control-Allow-Origin", "*");Allows us to send requests to the API from our frontend