1.06k likes | 1.08k Views
If youu2019re new to Node.js or just getting up to speed on its core concepts, this video will provide an introduction to the main fundamentals of this JavaScript-based platform.Node.js is open-source and completely free, used by thousands of developers around the world. It brings plenty of advantages to the table, making it a better choice than other server-side platforms like Java or PHP. The following presentation covers the basics of this Node.js, why itu2019s used, its different parts, the Node.js Express framework, use cases, and industry trends.<br><br>This Node.js training enables you to build network applications quickly and efficiently using JavaScript. The Node.js certification training course is designed to help developers understand and build web applications with the help of JavaScript.<br><br>Node.js Training Key Features<br>1. 100% Money Back Guarantee<br>2. 36 hours of instructor-led online training<br>3. Three real-life, industry-based projects<br>4. 16 chapter-end quizzes<br>5. Master Node.js, Socket.io, Express.js with MongoDB, and SQLite<br>6. Flexibility to choose classes<br><br>Node.js Course Overview:<br>The Node. js certification training course helps you gain an in-depth knowledge of concepts such as Express.js, Node Packet Manager (NPM), shrink-wrap, NPM Vet, REST, Express.js with MongoDB, and SQLite CRUD operations. This Node.js training focuses on the essential concepts of Node.js and provides hands-on experience in building an HTTP server.<br><br>Eligibility:<br>This Node.js Certification Training is ideal for technical project managers, technical leads, full-stack web developers, quality analysts, architects, and students or aspiring professionals who wish to lead web development.<br><br>Learn more at https://www.simplilearn.com/node-js-certification-training
E N D
What’s in it for you? What is Node.js?
What’s in it for you? What is Node.js? Why Node.js?
What’s in it for you? What is Node.js? Why Node.js? Parts of Node.js
What’s in it for you? What is Node.js? Why Node.js? Parts of Node.js Node.js Express Framework
What’s in it for you? What is Node.js? Why Node.js? Parts of Node.js Node.js Use-Cases Node.js Express Framework
What’s in it for you? What is Node.js? Why Node.js? Parts of Node.js Node.js Use-Cases Industry Trends Node.js Express Framework
In the Forefront User interacts only with the “Client” of the web application, the rest is handled by “Server” Server Database Client
Behind the Scenes Client Server Database
Behind the Scenes Client Server Database
React JS, Angular Client Server Database
React JS, Angular Node.js, PHP, Java Client Server Database
React JS, Angular Node.js, PHP, Java MySQL, MongoDB Client Server Database
What is Node.js? • Node.js is an open-source, cross-platform JavaScript runtime environment and library for running web applications outside the client’s browser
Node.js is an open-source, cross-platform JavaScript runtime environment and library for running web applications outside the client’s browser • It is used for creating server-side web applications
What is Node.js? • Node.js is an open-source, cross-platform JavaScript runtime environment and library for running web applications outside the client’s browser • It is used for creating server-side web applications • Node.js is perfect for data-intensive applications as it uses an asynchronous, event-driven model.
Node.js was developed by Ryan Dahl in 2009 and its latest version is v13.3.0
Node.js is really fast • Node Package Manager has over 50,000 bundles for at the developers’ disposal
Node.js is really fast • Node Package Manager has over 50,000 bundles for at the developers’ disposal • Perfect for data intensive, real-time web applications as Node.js never waits for an API to return data
Node.js is really fast • Node Package Manager has over 50,000 bundles for at the developers’ disposal • Perfect for data intensive, real-time web applications as Node.js never waits for an API to return data • Better synchronization of code between server and client due to same code base
Node.js is really fast • Node Package Manager has over 50,000 bundles for at the developers’ disposal • Perfect for data intensive, real-time web applications as Node.js never waits for an API to return data • Better synchronization of code between server and client due to same code base • Easy for web developers to start using Node.js in their projects as it is a JavaScript library
Modules Debugger Console DNS Domain Cluster Buffer Global Error Handling Streaming
Modules Debugger Console DNS Let us go through each part of Node.js Domain Cluster Buffer Global Error Handling Streaming
Modules Debugger Console DNS Domain Cluster Buffer Global Error Handling Streaming
Modules • Modules are like JavaScript libraries that can be used in a Node.js application to include a set of functions
Modules // CREATING A WEB SERVER // Include modules var http = require(‘http’); var server = http.createServer(function(req, res){ //write your code here }); server.listen(2000); • Modules are like JavaScript libraries that can be used in a Node.js application to include a set of functions • To include a module in a Node.js application, use require() function with the parenthesis containing the name of the module
Modules • Node.js has many modules to provide basic functionality needed for a web application • Some of them are mentioned in this table
Modules Debugger Console DNS Domain Cluster Buffer Global Error Handling Streaming
Console • Console is a module that provides a way to debug similar to that of the JavaScript console provided by the internet browsers
Console • Console is a module that provides a way to debug that is like the basic JavaScript console provided by the internet browsers • It prints messages to stdout and stderr // WRITING “hello world” to console console.log(‘hello world’);
Modules Debugger Console DNS Domain Cluster Buffer Global Error Handling Streaming
Cluster • Node.js is built upon the concept of single-threaded programming
Cluster • Node.js is built upon the concept of single-threaded programming • Cluster is a module that allows multi-threading by creating child processes that share the same server port and run simultaneously
Cluster var cluster = require('cluster');if (cluster.isWorker) { console.log(‘Child thread’);} else { console.log(‘Parent thread');cluster.fork();cluster.fork();} A cluster can be added to an application in this way
Cluster Including cluster module in the application var cluster = require('cluster');if (cluster.isWorker) { console.log(‘Child thread’);} else { console.log(‘Parent thread');cluster.fork();cluster.fork();} A cluster can be added to an application in this way
Cluster var cluster = require('cluster');if (cluster.isWorker) { console.log(‘Child thread’);} else { console.log(‘Parent thread');cluster.fork();cluster.fork();} A cluster can be added to an application in this way Creating child threads by using fork() method
Modules Debugger Console DNS Domain Cluster Buffer Global Error Handling Streaming
Global • Global objects in Node.js are available in all modules
Global • Global objects in Node.js are available in all modules • These objects are functions, modules, strings, etc.
Global Some Node.js global objects are mentioned in the table
Modules Debugger Console DNS Domain Cluster Buffer Global Error Handling Streaming
<EvalError>, <SyntaxError>, <RangeError>, <ReferenceError>, <TypeError>, and <URIError> Error handling
Error handling <File does not exist>, <closed socket>
Error handling Errors specified by user in the code