I am using visual studio code to run angular projects. While running the server through npm start, my laptop takes a lot of time compared to others. Is it related to my pc specifications or I can do something to improve it? I think my Pc Specs are suitable for npm to run smoothly 64 bit 2TB HD i5 processor
-
Are you using 32-Bit or 64-Bit NodeJS? And are you on a 32- or 64-bit System? – evayly Apr 14 '18 at 05:43
-
64 bit System @evayly – Aniruddhsingh Rathore Apr 14 '18 at 19:34
1 Answers
If you are trying to just run the project to develop it you should be using ng serve
(you must have the angular cli installed). ng serve
builds the project into ram and watches your files for changes, so it is very fast.
If you are trying to run your project for other people to use, you should be using ng build
and/or ng build --prod
to build your project and then a web server to serve it from there on.
You can even add addtional parameters to ng build
such as --build-optimizer=true
or --sourcemaps=false
to optimize the output.
You can find a more detailed guide and all the parameters here.
Regarding the build time, afaik there is no way of speeding it up, but builds are usually only done every once in a while, so you should have no problems with a couple of minutes of build time.

- 1,636
- 19
- 27
-
In my case ng serve command never starts.. waited almost 20+ minutes... – Ziggler Sep 24 '18 at 16:24