Last updated Feb 20, 2021

Getting Started With Node.js : A Begginers Guide

Begin your Node.js journey with this beginner-friendly guide.

Getting Started With Node.js : A Begginers Guide

Howdy coders, In this post we are going to understand some basics of the Nodejs framework

So, let’s get started…

What is Node.js?

Nodejs is an Open source and cross-platform runtime environment for executing JavaScript code outside of the browser.
-

In other words, NodeJS is a platform which allows you to build scalable network application using JavaScript on the server side

NodeJS is not programming language but it’s a platform where you can run JavaScript on server

Node.js Was Created by ‘Ryan Dahl’

Prerequisites

  • Basic understanding of javascript
  • Basic Knowledge of Ajax, HTML, CSS and other web technologies will be good

Node.js Features:

  • Node.js is Great for prototyping and agile development.
  • Node is ideal for making highly-scalable, data-intensive and real-time apps.
  • Its used for production in large companies like Flipkart, uber, Netflix, Walmart and so on.
  • Nodejs uses JavaScript everywhere, so we don’t need to learn any extra languages to dive in.
  • Using node.js we can make Cleaner and more consistent codebase
  • Nodejs has the Large ecosystem of open source libs which we make development process very faster
  • Node.js is making use of the Google Chrome V8 runtime engine
  • V8 is written in c++ and that is why it is very fast.
  • Node applications are single-threaded. That means a single thread is used to serve all clients.
  • Node applications are asynchronous or non-blocking by default. That means when the application involves I/O operations (eg accessing the file system or the network), the thread doesn’t wait (or block) for the result of the operation. It is released to serve other clients
  • Node.js use event loop is single-threaded by nature. But most the I/O (network, filesystem, etc) is run on separate threads because the I/O APIs in Node.js are asynchronous/non-blocking.

 Benefits of using NodeJS:

Organizations are making use of Node.js because of following reasons:

  • Write all code in JavaScript
  • Easy to modify and maintain
  • Faster Development time
  • Better Performance because of Non-Blocking or Asynchronous I/O
  • Every day more than 500 new packages are published to NPM everyday

What is the V8 Engine and How it makes node.js faster?

V8 is an open source engine written in C++. 
-

Rather than treating each JavaScript object as having its own separate class, V8 adds a hidden class that identifies common properties between those objects.

V8 translate the JavaScript code into Machine code. the computer processor can read machine code directly.   Without this, your browser would have to translate each piece of JavaScript into machine code every time you run a   script on a web page.

V8 has better garbage collection, which means that when it finishes using memory for one task, it can better reclaim that memory for another task.

So Because of these reasons, it makes javascript faster.

Which types of application can we build using Node.js?

  • I/O Application
  • Data Streaming Applications
  • Data Intensive Realtime Applications
  • JSON APIs based Applications
  • Single Page Applications
  • Real-Time Web Application like (Chat, Video Streaming, etc…)
  • Network applications
  • General purpose applications
  • IOT Applications.

When not to Use NodeJS:

You should avoid using Node for CPU-intensive applications, such as a Heavy image manipulaton,video encoding/conversion service or file compression because while executing these operations, other clients have to wait for the single thread to finish its job and be ready to serve them.

NOTE : In Node, we don’t have browser environment objects such as window or the document object. Instead, we have other objects that are not available in browsers, such as objects for working with the file system, network, operating system, etc.

Conclusion:

Thanks for reading. in this post, we have covered some basic introduction of node js so, its good to have some basic knowledge of node.js before we dive into some advanced topic.

Do let me know If you face any difficulties please feel free to comment below we love to help you. if you have any feedback suggestion then please inform us by commenting.

Don’t forget to share this tutorial with your friends on facebook, and twitter

Tags

Available for projectsLet’s build together

Need this built properly,
not just explained?

I take on Angular and NestJS work directly — auth systems, multi-tenant SaaS, API rewrites and the deploy pipeline underneath them. You talk to the person writing the code.

Projects delivered
20+ Projects delivered
Angular • NestJS
7+ years Angular • NestJS
Average reply time
1 day Average reply time

What I can help with

  • Auth and permissions systems
  • Multi-tenant SaaS foundations
  • API design and rewrites
  • Deploy pipelines and VPS setup
  • Bug fixing and performance optimization
Send me a message

Tell me about your project and I’ll get back with a realistic scope and price.

Turn
Your Ideas
Into Reality

Stay in the loop

Get the finished tutorials, projects and resources in your inbox.

Join 5,000+ developers and get new tutorials, source code, product updates and exclusive content — straight to your inbox.

  • No spam
  • Useful content only
  • Unsubscribe anytime

Subscribe to TutsCoder

Be the first to get new tutorials, projects and tips.

Join 5,000+ developers already learning with us.

Learn
Build
Grow

Discussion

Comments

Share your thoughts, ask questions or suggest improvements. Let’s learn and grow together!

Loading comments…

Join the discussion

Sign in to join the discussion. Your account also keeps your saved tutorials and path progress.