Skip to content
Advertisement

Tag: node.js

What is “entry point” in npm init

I have an empty new project, when i run npm init i got a list of questions to answer, for example: 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? Answer Quoting from this blog post: Entry point is the javascript file that will

require is not defined? Node.js [duplicate]

This question already has answers here: Client on Node.js: Uncaught ReferenceError: require is not defined (11 answers) Closed 5 months ago. Just started working with Node.js. In my app/js file, I am doing something like this: app.js When I’m in my terminal and run node app.js, the console spits out ‘running server!’, but in my browser I get, Uncaught ReferenceError:

Run JavaScript in Visual Studio Code

Is there a way to execute JavaScript and display the results using Visual Studio Code? For example, a script file containing: I assume that Node.js would be needed but can’t work out how to do it? By Visual Studio Code I mean the new Code Editor from Microsoft – Not code written using Visual Studio. Answer This solution intends to

Advertisement