Code splitting is one of the best feature of web pack, it allows you to split your code in various bundles which can be called on demand in app life cycle. This has a significant impact on application load times.
you can simply write
var required_module = ‘any module’
// you can provide the value on runtime if it is provided as parameter
// module object returned
I recently came across a need to call any function from node modules based on parameters provided. The function name was passed as string.
If you console.log(module) you will see in…
NPM registry is the best place to share your node package globally. NPM is powered by a couchDB database. We will go through the process of creating the node package and publishing it as a public package.
2. Login the npm cli using your username and credentials.
On the command line -
Email: (this IS public) <youremail>@<domain.com>
If the above information is correct you will get the message as:
Logged in as <username> on https://registry.npmjs.org/.
3. Now we have to create a node package, you…
System engineering design based on microservices provides many advantages alongwith some complexity. This article defines an approach to reap maximum benefits and mimimize potential pain areas and other cons associated with microservices designs.
Most of the implementations get mislead by the term microservice resulting in countless services spread over the whole system architecture. The best approach is to have one microservice for one logical division. Lets say in object oriented programming a separate class is created for user and order, these classes encapsulate all functionality associated. If we translate into microservice, two microservices will be created namely user and order…