Node.js

From MgmtWiki
Jump to: navigation, search

Full Title or Meme

Yet another web server platform or even ecosystem.

Context

  • This is an attempt to enable JavaScript programmers to work in a familiar language on both the client and the server.
  • It really became popular when metalanguage like Typescript were crafted to pre-compile fully typed language into the limited functionality of JavaScript.

Q&A

  • What does the command "node ." do?
  • By default Node.js is trying to load a module located in the folder that you are passing to it as an argument (. - just bash variant of the current folder). Then it runs whatever is written in the "main" section of the package.json file found in this folder. If no package.json found in the folder or if no "main" section is present, then Node.js will try to run the index.js file in this particular folder you are passing.

References