Álvaro José Agámez Licha
Software Developer en PSL
https://github.com/CodeMaxter
@codemaxter
Open Source Server Enviroment For Your JavaScript Apps
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine, or Microsoft ChakraCore.
Node.js is a single threaded language which in background uses multiple threads to execute asynchronous code.
Node.js is fast and efficient because use a single thread:
Node = Not Single Threaded
Event Loop = Single Threaded
Everything in JavaScript runs parallel except your code. Your code executes one thing at a time even when other workers are doing their jobs concurrently.
Open your terminal and type the following:
npm install -g jshint
This will install the jshint package globally on your system. We can use it to lint a es6.js file:
jshint es6.js
We can also install packages locally to a project, as opposed to globally on our system. Create a test folder and open a terminal in that directory. Next type:
npm init -y
This will create and auto-populate a package.json file in the same folder. Next, use npm to install the lodash package and save it as a project dependency:
npm install lodash --save