NodeJS #7

Practice time

$ whoami

Inna Ivashchuk

Senior Software Engineer

JS developer, music fan, movie-dependent and Star Wars fan 🤓

May the Force be with you!

4+ years with GlobalLogic

6+ years in web-development

        GitHub page

Agenda

  • Nowadays development process

  • Practice time

Nowadays development process

Docker

+

Web Development in 2021

Nowadays SDLC with CI/CD, containers,  orchestration and clouds

Working in a Team

Version System Control (VSC)

Would be good to know:

  • How to use Git
  • How to create a Pull request
  • What is Code review

Pull Requests

How to push your local changes to a team's repository?

# fist - create a new branch
$ git checkout -b feat-my-new-user-form-and-ctrl

# next - commit your changes
$ git commit -m "feat(app): user form and controller"

# next - push your branch with changes
$ git push origin HEAD

# next - create a PR using GitHub
# next - request Code review
# final - merge your changes into main/master branch

Code review

Teammates will do a code review and can suggest how to improve your code, optimize solution or make it simpler

CI/CD

What is CI/CD?

Continuous Integration

build

checks

developer

artifact

CI

VCS

(Docker image)

  • set up the environment
  • install required dependencies

CI: preparation

Code checks using TS Lint:

CI: checks

  • code styles
  •  typos
  •  missing symbols
  • etc

CI: tests

Write and run tests is always a good idea

Time to build our application:

CI: build

CD vs CD

Continuous Delivery/Deployment

artifact

CD

dev

production

(docker image)

 Continuous Integration + Continuous Delivery || Continuous Deployment

CI/CD pipeline

The most popular tools

Docker

 The possible situation on a new project

Requested changes

Use new API for authentication

Login

What should be done to apply changes?

  • install all backend related stuff locally (Java, Gradle, Maven, Mongo, PostgreSQL and etc)
  • do changes in JavaScript files
  • test your changes locally with backend API
  • finally - commit changes

What can happen next

  • Changes deployed/published
  • QAs do validation, but your change is not working correctly

How it can be done

  • Install Docker
  • Pull Docker images with latest version of backend API
  • Run it locally
  • Apply and test your changes
  • Profit 🤩

It's how Docker was born

Cloud Providers and Containers

Deploy

Deploy

Deploy

Deploy

About Docker

Docker is an open platform for developing, shipping, and running applications.

  • enables you to separate your applications from your infrastructure so you can deliver software quickly
  • you can manage your infrastructure in the same ways you manage your applications
  • you can shipping, testing, and deploying code quickly
  • you can significantly reduce the delay between writing code and running it in production

Practice time

Our mission

  1. Continue working on an online coffee shop “Cold Brew”:

    1. Server:  MongoDB + Express + NodeJS ( + bonus Docker)

    2. UI: React + CSS

Quiz Time

Q & A

Homework

  1. Continue working in the tutorial6 directory

  2. Create frontend part of your app using React + CSS + Formik (optional)

  3. Connect your UI (frontend) part with backend

  4. Try to use API endpoints from UI

  5. Finally - result :) 

Helpful souces

NodeJS Core #7

By Inna Ivashchuk

NodeJS Core #7

  • 380