Skip to the content.

NodeJS Commands

Sl.No. Commands Description
01. npm install node@14.8.0 Install node specific version
02. npm init Creates package.json
03. npm install Install the dependencies in the local node_modules folder
04. bower install package manager
05. npm install -g gulp  
06. npm install -g bower  
07. npm install -g live-server  
08. npm install -g grunt-cli  
09. live-server Start NodeJs Server
10. npm install -S express  
11. npm install -S body-parser  
12. npm start  
13. gulp develop Server Start
14. gulp help gulp Help
15. gulp build Clean and minification into single file
16. gulp serve  
17. gulp watch  
18. gulp test:tdd Unit Testing
19. gem install sass  
20. sass -? Help
21. sass –update var_styles.scss  
22. sass –watch dir:dir Watch for changes
23. npm install -g webpack Istall webpack globally
24. webpack Run
25. npm -l Display full usage info
26. ruby -v Ruby Version
27. node -v Node Version
28. npm -v Node Package Manager Version
29. tsc -v TypeScript Version
30. git version Git Version
31. webpack -v Webpack Version
32. npm install mongoose  
33. npm config rm proxy  
34. npm config rm https-proxy  
35. npm config list  
36. npm install firebase angularfire2 –save  
37. npm install git+https://github.com/angular/angularfire2.git  
38. npm install firebase angularfire2@next –save  
39. npm uninstall -g angular-cli  
40. npm cache clean  
41. npm install -g typescript  
42. npm install –save rxjs@5.5.2 Reactive Extensions Library for JavaScript
43. npm install express-session  
44. node app Run app.js file on node server
45. npm install -g jshint  
46. npm install express –save Install express into local project
47. npm install cors –save Cross Origin Resource Sharing –> It allows open api to accessibale by other domains
48. npm install body-parser –save  
49. npm install underscore –save  
50. npm remove underscore –save  
51. npm install ws –save Install WebSocket
52. npm install socket.io –save Used for creating websocket when browser doestn’t support websocket
53. npm install -g mocha JavaScript Unit Testing framework
54. mocha To run mocha test
55. npm install nock –save-dev Use to create mock server for testing
56. npm install rewire –save-dev Use for Injecting dependencies
57. npm install sinon –save-dev Use to create mock object for test
58. npm install -g istanbul JavaScript test coverage tool
59. istanbul cover _mocha Run istanbul report
60. npm install supertest –save-dev  
61. npm install cheerio –save-dev  
62. npm install grunt-contib-jshint –save-dev  
63. npm install grunt-contrib-less –save-dev  
64. grunt css Convert “.less” file into corresponding “.css” files
65. npm install grunt-autoprefixer –save-dev Add code for browser dependencies in css
66. npm install grunt-browserify –save-dev Create bundle.js combining all files together
67. npm install grunt-contrib-watch –save-dev  
68. grunt watch  
69. ng add @angular/material  
70. npm install -g live-server  
71. npm link create a symlink in the global folder
72. npm link redis link-install the package