close[x]


Node.js

Node.js-Home Node.js-Environment setup Node.js-Basic Node.js-Modules Node.js-HTTP (Web server) Node.js-File system Node.js-URL Modules Node.js-NPM Node.js-Event Node.js-Email Node.js-MySQl Node.js-Upload files Node.js-Event loop Node.js-File I/O Node.js-Objects Node.js-Web Node.js-RESTFull API Node.js-Thread



learncodehere.com




Node.js - Environment Setup

  • Node.js development environment can be setup in Windows, Mac, Linux
  • The following tools/SDK are required for developing a Node.js application

  • Node.js
  • Node Package Manager (NPM)
  • TextEditor

  • Installing Node.js for Windows

    Go to Node.js official website https://nodejs.org/en/


    node.js download

    Download node.js for windows by clicking on 12.16.3 LTS or 14.2.0 Current button.

    After you download the node.js, double-click on it to start the installation and follow it.


    Verify Installation

    After installing node.js you can verify it.

    Open the command prompt(CMD) and typing node -v

    If Node.js is installed successfully then CMD display the version of the Node.js


    node.js download


    Installing Node.js for Windows

    Go to Node.js official website https://nodejs.org/en/download/


    node.js environment setup

    Download node.js for mac by clicking on macOS installer button.

    After you download the node.js, double-click on it to start the installation and follow it.


    Verify Installation

    After installing node.js you can verify it.

    Open the terminal window and typing node -v

    If Node.js is installed successfully then it will display the version number of Node.js installed on your Mac.


    TextEditor

    Node.js uses JavaScript to develop an application.

    Node.js uses any text editor tool that supports JavaScript syntax

    Node.js can use Visual Studio,Visual Studio Code, Sublime text, Eclipse, etc.


    Node.js Console

    Node.js comes with virtual environment called Read-Eval-Print-Loop(REPL)

    REPL is quick and easy way to test simple Node.js/JavaScript code in command prompt


    Example

    Open command prompt (in Windows) or terminal (in Mac or UNIX/Linux)