I would like to share some NodeJS Basic questions to clear the NodeJS concepts.
How NodeJS works?
What is the npm?
How npm install works?
What is the ng build ?
Basically “ng build” is Angular CLI command to bundle the angular app into a ‘dist’ folder.
How node_modules works?
All NodeJS built-in or installed modules/libraries/dependence are present in node_modules (core module) folder. These java-script/json etc files are created (downloaded) by the help of package.json or package-lock.json file (present in the project root directory). These modules are called/load by require(‘module name’) or import syntax. Module should have index.js file. nodule_modules folder should not be present in the source code.
What is the polyfills.js?
Polyfills uses to compatible with different browsers.To include the polyfill you need to require it at the top of the entry point to your application.
What is npm audit fix?
To find the vulnerabilities ‘npm audit’ command scan the all packages/dependencies (which are mention in package.json) in node_modules folder. npm audit fix command uses to fix the vulnerabilities.
What is the nodemon?
To avoid the restart node server after edit the code in file. nodemon watches the changes and restart the server automatically.
Why Express module is used in NodeJS?
Express is a very popular lightweight web framework (Back-end) for NodeJS. It is used in a very simple and systematic way to create web servers. It is also used to make REST APIs. It works with a combination of other modules or frameworks in NodeJS.
Why do use npm init command?
It uses for create the package.json file.