Home > OS >  How should I call the script that starts my project in my package.json?
How should I call the script that starts my project in my package.json?

Time:10-03

If I have a Node.js project and want to create a script that does: nodemon server.js, is there any convention for calling this script? I usually call it dev but just wanted to know if there's any specific convention.

CodePudding user response:

"scripts" : {"start:dev": "nodemon server.js"}

I think you are using the same. and it is the best practice.

CodePudding user response:

You looking for start?

"scripts": {
            "start": "nodemon server.js",
            "dev": "nodemon server.js"
        },
  • Related