0% found this document useful (0 votes)
55 views5 pages

Aim: Introduction and Installation of Node - Js

Node.js is a JavaScript runtime environment that allows JavaScript to be used for server-side scripting. It allows building fast and scalable network applications. Some key differences between Node.js and other languages include its use of asynchronous and event-driven programming, and the ability to have full stack development with a single programming language. Major companies that use Node.js include Netflix, Uber, PayPal and NASA. Node.js can be used for applications like chat rooms, streaming, and real-time apps due to its asynchronous and fast nature.

Uploaded by

Manthan Bhavsar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views5 pages

Aim: Introduction and Installation of Node - Js

Node.js is a JavaScript runtime environment that allows JavaScript to be used for server-side scripting. It allows building fast and scalable network applications. Some key differences between Node.js and other languages include its use of asynchronous and event-driven programming, and the ability to have full stack development with a single programming language. Major companies that use Node.js include Netflix, Uber, PayPal and NASA. Node.js can be used for applications like chat rooms, streaming, and real-time apps due to its asynchronous and fast nature.

Uploaded by

Manthan Bhavsar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Aim: Introduction and Installation of Node.js.

1. Differentiate JavaScript and Node.js.

Features JavaScript Node.js


Type Programming Language Interpreter and environment
for JavaScript

Utility Used for any client-side activity for a Used for accessing or
web application performing any non-
blocking operation of any
operating system

Running Spider monkey (FireFox), JavaScript V8 (Google Chrome)


Engine core (Safari), V8 (Google Chrome),
etc.

2. What is the difference between ‘front-end’ and ‘back-end’ development?

Front-end Development Back-end Development


Uses mark up and web languages like Uses programming and scripting languages
HTML, CSS, JavaScript like Python, Ruby, Perl etc.
Based on asynchronous requests and AJAX Based on Server Architecture
Better Accessibility Enhanced Security
Used for SEO Used for Backup

3. What is Node.js?
Node.js is a powerful framework developed on Chrome’s V8 JavaScript engine that
compiles the JavaScript directly into the native machine code.
It is a lightweight framework used for creating server-side web applications and
extends JavaScript API to offer usual server-side functionalities.
It is generally used for large-scale application development, especially for video
streaming sites, single page application, and other web applications.

4. Write down advantages of Node.js.

1
Features Description
Fast Node.js is built on Google Chrome's V8 JavaScript Engine which
makes its library very fast in code execution
Asynchronou Node.js based server never waits for an API to return data thus making
s it Asynchronous
Scalable It is highly scalable because of its event mechanism which helps the
server to respond in a non-blocking way
Open Source Node.js has an extensive open source community which has contributed
in producing some excellent modules to add additional capabilities to
Node.js applications

No Buffering Node.js applications simply output the data in chunks and never buffer
any data

5. How does Node.js differ with other languages?


The main advantage is that Node.js runs JavaScript. So, a programmer doing web
development can develop the entire stack in one programming language.
The Node.js platform is fast, as well.
The libraries are designed to run an event loop, and uses call-backs, rather than relying on
running multiple processes. This saves on the overhead of task switching and managing
resource locks.
It’s harder to program with events and call-backs, but, in some ways, it doesn’t matter: if
you need to handle many connections and requests, traditional multi-process architecture
is harder to scale up, and multithreaded style programming becomes difficult. You either
suffer the expense of more difficult programming early, or suffer glitches later on.
Since programmers are already dealing with call-backs programming in the web browser,
they have probably surmounted the learning curve related to the same style of
programming in Node.

6. Who uses Node.js?


 eBay
 Groupon
 Medium
 LinkedIn
 Netflix
 Uber
 Trello
 PayPal
 NASA
 Walmart

2
 Mozilla
 GoDaddy

7. Which are the applications of Node.js?


 Browser games
 Chat Rooms
 Collecting Data
 Streaming
 Mean Stack
 Real-time application
 Fast and scalable application
 Processing
 API

8. How to download & install Node.js


Step 1: Download the Node.js .msi Installer
Go to official site of Node.js https://nodejs.org/en/download/ and download Node.js for
Windows by clicking the "Windows Installer" option, it will download .msi installer
For mac download .pkg file

Step 2: Run the Node.js Installer


 Welcome to the Node.js Setup Wizard
o Select Next

 End-User License Agreement (EULA)


o Check I accept the terms in the License Agreement

3
o Select Next

 Destination Folder
o Select Next

 Custom Setup
o Select Next

 Ready to install Node.js


o Select Install

o Note: This step requires Administrator privlidges.


o If prompted, authenticate as an Administrator

 Installing Node.js
o Let the installer run to completion

 Completed the Node.js Setup Wizard


o Click Finish

9. How to check installed version of node.js?


To check the version of Node.js on your PC, you can test the following command in your
Command Prompt
$ node -v

4
10. How to write and execute Node.js program to print “Hello World” in console?
First of all, open any text editor create a new file and save in .js format, and write
console.log("Hello World");
and save the file.
Now to run the program you need to open cmd in that folder where you save the .js file
and type
node hello.js
and it will show the output.

You might also like