What is Node.js?

A free video tutorial from Mosh Hamedani
Helping Learners Build Successful Coding Careers
Rating: 4.6 out of 5Instructor rating
20 courses
801,024 students
What is Node

Learn more from the full course

Node.js: The Complete Guide to Build RESTful APIs (2018)

Learn to build fast, scalable and secure RESTful services with Node, Express and MongoDB, from setup to production

15:02:26 of on-demand video • Updated April 2018

Build the backend for your web and mobile apps
Use modern JavaScript features (ES6, ES7)
Implement CRUD operations
Handle and log errors, the right way
Write unit and integration tests
Practice test-driven development (TDD)
Store and retrieve complex data in MongoDB
Implement authentication and authorization
Deploy your Node apps to production
Apply the best practices for building fast, scalable and secure apps
Node js or node, is an open source and cross platform run time environment for executing JavaScript code outside of a browser. Quite often we use Node to build backend services, also called API's or Application Programming Interfaces. These are the services that power our client applications. Like a web app running inside of a web browser, or a mobile app running on a mobile device. These client apps are simply what the user sees and interacts with. They're just a surface, they need to talk to some services sitting on the server or in the cloud to store data, send emails, push notifications, key cuff work flows and so on. Node is ideal for building highly-scalable, data- intensive and real-time back end services that power our client applications. Now you might ask, but Mosh, there are other protocols (?) and frameworks out there for building backend services such as ASP.NET, Rails, and Jango, and so on. So what's so special about Node? Well, Node is easy to get started and can be used for prototyping and agile development. But it can also be used for building super fast and highly scaleable services. It's used in production by large companies such as PayPal, Uber, Netflix, Walmart, and so on. In fact, at PayPal, they rebuilt one of their Java and Spring based applications using Node, and found that the Node applications was built twice as fast with fewer people in 33% fewer lines of codes and 40% fewer files. And more importantly, they double the number of requests served per second, while decreasing the average response time by 35%, so Node is an excellent choice for building highly scaleable services. Another reason for using Node, is that in Node applications, we use JavaScript, so if you're a front end developer and know JavaScript, you can reuse your JavaScript skills and transition to a full stack developer, and get a better job with better pay. You don't have to learn a new programming language. Also, because you can use JavaScript both on the front end and on the back end, your source code will be cleaner and more consistent, so you would use the same naming convention, the same tools and the same best practices. And finally, another reason for using Node, is it has the largest ecosystem of open-sourced libraries available to you. So, for pretty much any features or building blocks you want to add to your application, there is some free open sourced library out there that you can use. So, you don't have to build these building blocks from scratch, and instead you can focus on the core of your application. Next we're going to look at the architecture of Node.