Introduction to Node.js
Lab
Intermediate
6 h 50 m
2019-02-18
Lab Overview
Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js represents a "JavaScript everywhere" paradigm, unifying web application development around a single programming language, rather than different languages for server side and client side scripts. In this hands-on lab, you will learn everything from how setup node.js, install packages, understand routing and templating, to perform common operations like file i/o, data access, and deployment.

Related Learning Path(s):
Web Developer
Objectives
  • Introduce you to core concepts of Node.js
  • Understand how the node package manager (NPM) works
  • Understand how to perform file i/o with node.js
  • Understand the basics of routing and templating with node.js
  • Understand the basics of data access
  • Understand how to build and host REST APIs using node.js
  • How do deploy a node.js app
Pre-Requisites
  • Understanding of JavaScript
  • Familiarity with command line tools
Exercises
In this section you will learn how to set up your environment for optimal Node development. You will install and configure a few tools as well as run a simple Node.js example to test out everything.
This module will introduce the core concepts of NodeJs. We’ll provide a deeper understanding of how Node works behind the scenes, touching on areas such as files, processes, HTTP modules, and the concepts of Promises and Async/Await.
In this module we introduce the concept of routing and templating. We’ll explore the use of routes to navigate users through the pages of a Node app. We’ll look into features such as Express, Routes, Controller function, and Views. And we'll discuss Node.Js templating concepts.
Here we’ll look into Node.Js Databases and relational mapping modules. We’ll explain how to use Node.Js ORM and the supported databases such as MySQL, MongoDB, and so on. In the process, we’ll set up mongodDB and build a Node application that stores user data in mongoDB and PostgreSQL databases. But before we can explore that, it's important to understand what Data storage means.
This exercise will focus on the core concepts of Restful API architecture. We'll explore various REST representations, HTTP methods, and Restful web services. You'll also get some hands-on experience building a simple REST API in our Node.js application using these concepts.
In this exercise, we’ll explain how to use the Node.js email module and file handling system for emails and project/system files. We’ll also explore other email handling modules, such as Nodemailer, and demonstrate how to handle file uploads with Multer.
Once you're done building your site, you're going to need to host it somewhere more public and accessible than your PC. Up to this point you've been working in a development environment using Express/Node as a web server to share your site with the local browser/network.
This exercise provides a brief overview on selecting a hosting site to get your Node app into production. We'll also go through an example on how to install the Node app on the [Heroku](https://www.heroku.com/) cloud hosting service.
Real-Time Lab
Not Registered?
Create Account
Already Registered?
Login
What are Labs?

Labs provide a live environment to get hands-on experience using the same tools and services in the real world.


Learn More