Working on a Nest project, I noticed that the "start" configuration in the package.json file is structured like this:
"start:dev": "nest start --watch",
"start": "node dist/main.js",
I am curious why the second line doesn't simply use "nest start" instead. Both commands seem to achieve the same outcome. According to the official documentation:
nest start
ensures that the project has been built (similar tonest build
) and then runs the compiled application using thenode
command in a streamlined manner.
It seems logical to always build the project before running it. So is there any particular reason not to use nest start
? Could there be performance implications or other significant differences?