What is "entry point" in npm init

Javascriptnode.jsNpm

Javascript Problem Overview


I have an empty new project, when i run npm init i got a list of questions to answer, for example:

name: (karma)
version: (1.0.0)
description:my project description
entry point: (index.js)

I am really confused about the one that says "entry point", Should this be my index.html file or my app.js or is it something else?

Javascript Solutions


Solution 1 - Javascript

Quoting from this blog post:

> Entry point is the javascript file that will be invoked when consumers > of your module “require” it, this file will include the main logic for > your module, or if it is a large module you can export public > functions found with other files (typically in the lib directory)

So it should be your app.js file.

Solution 2 - Javascript

For any project, entry point is the file from which execution starts. It depends on project configuration and run time environment of the technology we are using.

Examples : For a node.js project app.js is used initializes the app and glues everything together.

Solution 3 - Javascript

Entry point is the path that your users will access using the index.js to be able to access the full view and services of your module I will rather leave it the way it is if you do not know what you are doing.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAhmed FarahatView Question on Stackoverflow
Solution 1 - JavascriptleeorView Answer on Stackoverflow
Solution 2 - JavascriptMalatesh PatilView Answer on Stackoverflow
Solution 3 - JavascriptLamech DesaiView Answer on Stackoverflow