ng serve
serves an Angular project via a development server
npm start
runs an arbitrary command specified in the package's "start" property of its "scripts" object. If no "start" property is specified on the "scripts" object, it will run node server.js.
It seems like ng serve
starts the embedded server whereas npm start
starts the Node servers.
Can someone throw some light on it?
npm start
will run whatever you have defined for the start
command of the scripts
object in your package.json
file.
So if it looks like this:
"scripts": {
"start": "ng serve"
}
Then npm start
will run ng serve
.