concept entry point in category javascript

appears as: n entry point, entry point
Node.js in Practice

This is an excerpt from Manning's book Node.js in Practice.

Defining an entry point

Every module has an entry point: the object/function/constructor that we get when it’s required elsewhere using the require keyword. Since we know that we’ll be trying different implementations inside our lib directory, we don’t want lib/recurse.js to be the entry point, as it may change.

Usually index.js in the project root makes the most sense as an entry point. Many times it makes sense to have the entry point be minimal in nature and just tie together the parts needed to provide the API to the end user. Let’s create that file now: