Course Overview
Our instructor-led Node.js training course is aimed at giving developers a full understanding of the amazingly popular JavaScript runtime and npm package manager.
You would be hard pressed to find a JavaScript website / web app that doesn’t rely upon Node’s blisteringly fast performance these days. It’s open source, and cross-platform. And it’s lightweight!
When you install Node you’ll get the npm package manager too – adding further functionality to your design, development, testing and deployment lifecycle becomes a breeze.
So whether you’re creating a web app using Angular, React, Ember, or simply need to build some fast and sexy RESTful web services and APIs, we can help you get up to speed quickly, and point out some of the best packages available to use in your projects.
Learning outcomes
- Server-side JavaScript
- Node.js architecture and core concepts
- The Node.js module system
- Debugging Node.js
- Testing and TDD with Node.js
- RESTful services & API
- Working with JSON Data
- Connecting to various data sources
Who Should Attend?
Our Node.js training course is aimed at developers who want to get the most out of Node.js in order to develop, test and deploy JavaScript apps, simple web services and APIs on the popular runtime.
Pre-requisite
Familiarity with the basic concepts of JavaScript is required – an advanced knowledge of JavaScript will not be assumed.
Course Outlines
- Introduction to the course
- Course Outline
- Trainer and Delegate Introductions
- Server-side JavaScript – the very idea!
- What is Node.js
- The Node.js environment
- What is NPM?
- Why Node.js?
- Node.js REPL
- Node.js Editors and IDEs
- HelloWorld in Node.js first program
- Generating HTML from Node.js
- Handling Multiple URLs
- Accessing the Filesystem
- Node.js REPL
- Command Line Arguments
- Environment Variables
- dotenv Environment Variables Module
- Need for Callbacks / Primises
- Node Event Processing Loop
- Callback Functions
- Events
- Arrow Functions
- Introduction to module system
- Importing modules – require() function
- Core modules
- Parsing URLs via the url module
- Defining Custom Modules
- Importing Custom modules
- The package.json file
- Installing Additional Modules
- Global and local installation
- Running with Nodemon
- The history of async
- Callbacks, Promises, Async/Await
- Event emitters
- AbortController
- What is Express?
- Why Express?
- Obtaining Express
- Express HelloWorld
- Express HTTP methods and urls
- Sending Files
- Serving Static Files
- Template Engines
- Responding with JSON
- Express Application Generator
- REST Principles
- REST Basic Concept
- REST Design Pattern
- Express.js for REST APIs
- Creating the REST API
- Accessing REST APIs
- Using Postmon to Access RESTful APIs
- Organising Your Code
- Setting a Router
- Logging all Requests
- Testing Frameworks for JavaScript
- Introduction to Mocha
- Working with Mocha
- Mocha Test Specifications
- How Mocha finds tests
- Running Mocha Tests
- Test Fixtures
- Nested describe functions
- Chai assertion library
- Testing Promises
- Testing a Rest API
- Debugging in Node.js
- console.log v console.err
- Node.js console.module
- The inspector
- Inspector only console methods
- Security implications
- node-inspect Debugging Tool
- Visual Studio Code debugging
- Postmon
- Error messages
- Streaming Data
- Readable and Writable Streams
- Readable Streams
- Reading data via readable streams
- Handling readable stream events data and end
- Writable Streams
- Writing data via writable streams
- Handling on finish events
- Piping Data from one stream to another
- Buffers
- Callback errors
- Passing errors to Express
- Application specific errors
- Catching errors with promises
- Default promise error handlers
- The verror modulev
- Using the verror module
- Chaining VErrors
- Wrapping with WErrors
- Examples of Relational Databases
- MySQL
- Connecting to an SQL Database
- Query a Database
- Insert into the Database
- Update a row in the Database
- Delete a row in the Database
- Transaction Handling
- Examples of NoSQL Databases
- MongoDB
- Installing MongoDB driver
- Connecting to MongoDB database
- Create a Collection
- Inserting into a Collection
- Find Documents in Collections
- Update Documents
- Delete Documents
- Object Document Mapper
- Accessing Mongoose
- Mongoose Schema
- Adding a New User Document
- Finding Documents
- Updating and Deleting Documents
- Using Mongoose with REST API