Nodejs-workshop icon indicating copy to clipboard operation
Nodejs-workshop copied to clipboard

This is the repo for Nodejs workshop

:computer: Nodejs-workshop

Welcome to the Nodejs codelab. This codelab is divided into 5 parts. Starting from the :zero: understanding of nodejs to advance (using GraphQL). This is a well balanced codelab with theory and hands on.

:golf: Agenda

Agenda of this workshop to start from the zero knowledge of nodejs to take attendees to in-depth knowledge of the nodejs.

  1. Understand Node.js and NPM
  2. Undestand the underlying concepts and modules like Streams, http, Events
  3. Underatand the most widely used web framework Express.js
  4. How to create and work with APIs, Middlewares, CORS
  5. Debugging
  6. Microservices (both with and without Docker & Docker Compose)
  7. Mongodb
  8. Testing (Unit Testing, Integration Testing & TDD)
  9. GraphQL
  10. Deployment
  11. CI/CD Pipeline, Github hooks, etc
  12. Make your own custom NPM packages

Extra:

  1. env variables
  2. Best Practise around File Creation
  3. When to use streams
  4. How to handle heavy files

Sessions

:one: Session 1: All about Nodejs and Server

:two: Session 2: Express indepth

:three: Session 3: Build and design APIs

:four: Session 4: Micrsoservices

:five: Session 5 : GraphQL

Pre-requists

  • Javascript knowledge is mandatory. Concepts such as - Promise, Async-Await, ES6 , import-export.
  • Knowledge of Web (HTML, CSS, JS) and version control systems like Git.
  • Should have previous experience of building web apps
  • IDE of your choice.
  • Github, AWS, Heroku account

:white_check_mark: Session 1: Introduction to Nodejs [THEORY]

:golf: Agenda

Target of this workshop to understand what is client-server relationship and where they fit into the web applications.After that we will understand what nodejs , why it is important , where to use it and how is using it. We will also learn about the building blocks of nodejs - event-loop , single-thread, non-blocking input output, V8 and call-stack. We will touchbase - get(), post(), patch(), delete(), put() and timers too. We will learn about NPM and will setup nodejs, nodemon and create our first server and do the get request.

  • Server side introduction.
  • What is Nodejs?
  • Why Nodejs?
  • Where to Use it?
  • Where not to use it?
  • Building blocks of Nodejs
  • Who is using Nodejs

Event Loop [THEORY]

  • What is event loop
  • Call stack
  • What is single thread
  • Comparison of single thread vs multi-thread
  • Timers introduction : setInterval vs setTimeOut

NPM [THEORY]

  • What is NPM
  • Why it is important
  • Important commands
  • Yarn vs NPM
  • What is package.json vs package.lock.json

Setup your workspace [CODELAB]

  • Prepare your system - nodejs, nodemon, etc.
  • Make your first package.json
  • Create your first server - HTTP Module
  • Create your first request client-server

:white_check_mark: Session 2: Express installation [THEORY + CODELAB]

:golf: Agenda

Now, we know Nodejs and used the http modules. Now, we will use framework - Express. We will understand what express and why we should use it. We will also go through the project we will be creating for this workshop. We will refactor the folder and files as per the project.

Topics

  • Middleware
  • Express
  • EJS
  • get() , post() request

Introduction to Express

  • What is express
  • Install express
  • Folder walkthrough
  • EJS introduction

Project walkthrough

  • Understand the project
  • Refactor the folder
  • Develop static HTML in EJS
  • Develop the routes for same pages
  • Do get() request for same
  • Congratualtions you have a nodejs based application!!

:white_check_mark: Session 3: API in nodejs

:golf: Agenda

Now, we know Nodejs, Express and used the http modules. Now, we will use framework - Express to create APIs. We will create APIs in Express. We will also go through the project we will be creating for this workshop. We will refactor the folder and files as per the project.

Introduction to APIs [THEORY]

  • What is API
  • Different type of APIs

Create your own API [CODELAB]

  • Create your own API vs stub data
  • Create the pages from stub data
  • Create your first API
  • Refactor the application to get the data from the API

cors [THEORY + CODELAB]

  • Introduction to CORS
  • cors() implementation

CRUD operation [THEORY]

  • What is CRUD
  • Why it is important
  • When to use which?

CRUD implementation [CODELAB]

  • create your pages for CRUD
  • Mock API for same
  • post(), put(), patch(), delete(), update()

:white_check_mark: Session 4: Archietecture design of the API (aka services)

:golf: Agenda

Now, we know Nodejs and used the http modules and Express. Now, we will understand the Design pattern of API.

Design of the API (aka services)

  • Why design is important
  • How to deisgn API
  • Good practises vs Bad practises
  • Design your first API
  • Microservice introduction

Introduction to MongoDB

  • Introduction to mongodb
  • Setup your DB
  • Store first data
  • Retrieve data
  • Connecting with application

Host your application

  • Host your application

Scalability, Security , testing, and performance in Nodejs application

  • What is scalability?
  • Why it is important?
  • Nodejs and Scalability.
  • Security issues.
  • Testing in Nodejs
  • Performance of nodejs application

:white_check_mark: Session 5: GraphQL with Nodejs

:golf: Agenda

Now, we know how to create APIs in node.Now we will understand how GraphQL works with Nodejs .

What is GraphQL

  • What is graphQL
  • Why it is required
  • Mutation, Query, resolver
  • GraphQL with Nodejs

:white_check_mark: Session 6: Deployment and CI/CD

:golf: Agenda

The last step is to do deployment of the application and creating of the pipelines for the CI and CD

Serverless

  • What is Serverless
  • Concepts of Serverless
  • Move your Nodejs code to serverless
  • Deploy on AWS

CI and CD

  • What is CI and CD
  • Concepts of CI and CD
  • AWS Pipelines
  • Create your pipeline

Venue

This workshop is happening at JSLovers, Bangalore. You can check my profile at linkedin and can follow me on twitter/hellonehha.

Collabration

If you want to collabrate at any of the session please reach me at [email protected]