To communicate between computer and ourselves we use shell. Shell can be GUI (graphical user interface) and CLI (command link interface).

CLI in mac called as terminal(shell). It is the text input interface software. In mac there are two types.

  1. bash-shell ===> old version
  2. zsh (z-shell) ===> new version

zsh…

--

--

.btn {text-decoration: none;cursor: pointer;font: inherit;background-color: #03be9f;border: 1px solid #03be9f;border-radius: 6px;color: #dafff7;padding: 0.5rem 1.5rem;text-align: center;box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);}.btn:hover,.btn:active {background-color: #02afa1;border-color: #02afa1;}

--

--

import React, { useEffect, useState } from “react”;const usePrompt = () => {
const [when, setWhen] = useState(false);
const [value, setValue] = useState(“”);
useEffect(() => {
if (when) {
const val = window.confirm(“Are you sure?”);
setWhen(false)
setValue(val)
}
}, [when]);
return [value, () => setWhen(true)];};export default usePrompt;

--

--

import React, { useEffect, useState } from “react”;
import { Prompt } from “react-router-dom”;
const useUnsaved = (message = “Do you want to leave”) => {
const [isDirty, setIsDirty] = useState(false);
useEffect(() => {
window.onbeforeunload = isDirty && (() => message);
return () => (window.onbeforeunload = null);
}, []);
const prompt = <Prompt when={isDirty} message={message} />; return [prompt, () => setIsDirty(true), () => setIsDirty(false)];};export default useUnsaved;

--

--

In AWS

create EC2 instancecheckmod and sshsudo yum update -ysudo amazon-linux-extras install docker sudo services docker start

The create docker image and pusblish to docker hub

In local

docker build -t node-ex-1 — platform linux/amd64 .docker tag <locl_image_name> <docker_hub_image_name>docker logindocker push <docker_hub_image_name>

In aws EC2

docker run — rm -d -p 80:80 <docker_hub_image_name>
Then add http security rule to security group

--

--