Mojstrski tečaj Fullstack React z TypeScript in GraphQL

Blog

Mojstrski tečaj Fullstack React z TypeScript in GraphQL

NewLine TinyHouse: Mojstrski tečaj Fullstack React z TypeScript in GraphQL ENG, 2020



Končni projekt :
https://www.tinyhouse.app/

Kako zagnati aplikacije

Delam v ubuntu linux 18.04.



Namestiti je treba Docker, Minikube, Kubectl, Skaffold.

Docker

$ docker -v Docker version 19.03.12

Namestitev minikube

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ $ minikube version minikube version: v1.12.1

Kubectl namestitev

$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ $ kubectl version --client --short Client Version: v1.18.6

Montaža Skaffold

$ curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 $ chmod +x skaffold $ sudo mv skaffold /usr/local/bin $ skaffold version v1.12.1

Zaženite minikube

$ { minikube --profile my-profile config set memory 8192 minikube --profile my-profile config set cpus 4 // minikube --profile my-profile config set vm-driver virtualbox minikube --profile my-profile config set vm-driver docker minikube --profile my-profile config set kubernetes-version v1.18.6 minikube start --profile my-profile } // Enable ingress $ minikube addons --profile my-profile enable ingress $ minikube --profile my-profile ip 172.17.0.3 $ sudo vi /etc/hosts #--------------------------------------------------------------------- # Minikube #--------------------------------------------------------------------- 172.17.0.3 tinyhouse.dev

Kako zagnati aplikacijo

zavezuj: 3934dd627e244a12907ea7c4595cb52474a47e18



$ cd skaffold $ docker login

Moram posodobiti ime slike dockerja webmakaka/tinyhouse *** v svoje v skriptah iz map skaffold in k8s.

$ skaffold dev $ kubectl get pods NAME READY STATUS RESTARTS AGE tinyhouse-client-deployment-d65d5b866-km548 1/1 Running 0 92s tinyhouse-mongo-deployment-755b899c89-qd44c 1/1 Running 0 92s tinyhouse-server-deployment-5744884c7c-lf8kp 1/1 Running 0 92s $ kubectl exec -it tinyhouse-server-deployment-5744884c7c-lf8kp sh # cd /app/ # npm run seed

brskalnik chrome

client ---> https://tinyhouse.dev/ graphql --> https://tinyhouse.dev/api/

vrsta: to ni nevarno v oknu brskalnika z varnostnim opozorilom.

Pričakovani rezultati:

Uporaba

Izbrišite minikube s projektom

$ minikube --profile my-profile stop && minikube --profile my-profile delete

Razvoj korak za korakom

Marley

Vsa vprašanja v angleščini: Telegram klepet
Vsa vprašanja v ruščini: Telegram klepet

Podrobnosti o prenosu:

Avtor: webmakaka

Izvorna koda: https://github.com/webmakaka/TinyHouse-A-Fullstack-React-Masterclass-with-TypeScript-and-GraphQL

#reactjs #react #javascript #typescript #graphql