EIEIOTECHNOVATION
← Training programmes

EIEIO / AUTOMATION & EMERGING TECHNOLOGY

API Development with Node.js and Express.js

Course outline

4 days

Duration

API Development with Node.js and Express.js

4 days

Overview

APIs (Application Programming Interfaces) serve as the backbone of modern web development, facilitating seamless communication between different software applications. At its core, an API defines a set of rules and protocols that enable various software systems to interact with each other, exchange data, and perform specific tasks.

JavaScript, a versatile and widely-used programming language, has become instrumental in API development due to its ability to run on both client and server-side environments. With the emergence of Node.js, a runtime environment built on Chrome's V8 JavaScript engine, developers gained the capability to use JavaScript for server-side scripting. Node.js, coupled with Express.js, a minimalist web application framework for Node.js, has revolutionized the way APIs are built and deployed.

Express.js simplifies the process of creating robust and scalable APIs by providing a lightweight yet powerful framework that handles routing, middleware, and HTTP request/response handling. Together, JavaScript, Node.js, and Express.js form a formidable trio, empowering developers to build sophisticated APIs quickly and efficiently, thereby driving innovation and enabling seamless integration across diverse software systems.

Course Objective

The course aims to equip participants with comprehensive knowledge and practical skills in API development using Node.js, MongoDB, MySQL, and serverless architecture. By the end of the training, participants will:

  • Gain proficiency in building server-side applications with Node.js and utilizing its asynchronous programming model effectively.
  • Learn to design and implement RESTful APIs using Express.js, a powerful web application framework for Node.js.
  • Acquire hands-on experience in integrating MongoDB and MySQL databases with Express.js for data storage and retrieval.
  • Master authentication and security techniques for APIs, including user authentication, input validation, and protection against common security threats.
  • Explore advanced API features such as pagination, error handling, file uploads, and versioning.
  • Understand the principles and benefits of serverless architecture and deploy serverless APIs using AWS Lambda and API Gateway.
  • Gain insights into best practices and industry standards for API development, ensuring scalability, reliability, and maintainability of applications.
  • Apply acquired knowledge through hands-on labs, exercises, and real-world projects to reinforce learning and prepare for practical application in professional settings.

Target Audience

Web developers, Software engineers , Database administrators or , IT professionals to expand their skills into backend development and API creation.

Prerequisite

Background in Object Oriented based programming language. Knowledge in Javascript is recommended.

Course Methodology

Interactive Lectures, Hands-on Labs and Exercises, Case Studies and Real-world Examples.

Day 1: Introduction to JavaScript and Node.js Basics

Recap of JavaScript

  • Introduction to JavaScript language
  • Basic syntax and data types
  • Control flow and loops
  • Functions and scope

Understanding Node.js

  • Introduction to Node.js
  • Setting up Node.js development environment
  • Exploring npm (Node Package Manager)
  • Basics of JavaScript asynchronous programming with Node.js

Day 2: Building a Simple API with Express.js and MongoDB

Setting Up Express.js and MongoDB

  • Installing Express.js and MongoDB
  • Creating a basic server with Express.js
  • Connecting Express.js with MongoDB using Mongoose ODM
  • Handling MongoDB CRUD operations in Express.js

Advanced MongoDB Operations

  • Indexing and querying MongoDB data
  • Aggregation pipeline in MongoDB
  • Handling relationships and embedding documents
  • Transactions and atomic operations in MongoDB

Day 3: Authentication, Security, and MySQL Integration

Authentication Basics

  • Introduction to authentication and authorization
  • Different authentication methods (JWT, OAuth)
  • Implementing basic authentication with Express.js

Integrating MySQL with Express.js

  • Introduction to MySQL database
  • Setting up MySQL database
  • Connecting Express.js with MySQL using Sequelize ORM
  • Performing CRUD operations with MySQL and Sequelize

Securing Your API and MySQL

  • Understanding security vulnerabilities in APIs
  • Implementing input validation and sanitization
  • Preventing common security threats (SQL injection, XSS)
  • Using middleware for authentication and authorization

Day 4: Advanced Topics, Serverless, and Best Practices

Advanced API Features

  • Pagination and filtering
  • Error handling and logging
  • Versioning APIs
  • Implementing file uploads
  • API Caching

Serverless Architecture

  • Introduction to serverless architecture
  • Pros and cons of serverless computing
  • Deploying serverless APIs with AWS Lambda and API Gateway

Testing, Deployment, and Conclusion

  • Introduction to testing frameworks (Mocha, Chai)
  • Writing unit tests for APIs
  • Deployment strategies for Node.js APIs
  • Continuous integration and deployment with CI/CD pipelines
  • Conclusion and wrap-up of the training program

Programme scope, delivery arrangements and suitability are confirmed during enquiry.