Carlos D
Carlos D

Reputation: 23

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

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.

Upvotes: 0

Views: 80

Answers (2)

Kr4ziDev
Kr4ziDev

Reputation: 52

You looking for start?

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

Upvotes: 1

anusha chokka
anusha chokka

Reputation: 54

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

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

Upvotes: 0

Related Questions