Open MelindaH26 opened 9 months ago
hello @MelindaH26 i have solution, can i make a PR?
since you have nodemon installed as a dependency all you need to do is go to your package json, look for the scripts and do two things.
Modify the start command to "scripts": { "start": "nodemon server.js" }
@nikhil3113 Yes, of course!
@Shoetan Thank you! I am not overly familiar with json scripts yet. Does your second example mean that the server could either be started with start npm run start
or npm run dev
?
Yes you are right. You can have both scripts. Just know if you use node server.js any change to your code you will have to kill and restart your server. If you use nodemon server.js there's no need for that.
Great, thank you for the tips @Shoetan!
You're welcome @MelindaH26
Get Nodemon to work in the dev environment so that the server doesn't have to be restarted every time a change is made to the code.