auth0-blog / react-tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Tutorial: Building and Securing Your First App

Application repo accompanying this Auth0 article. In this article, you will learn how to build modern applications with React and Node.js.

React Tutorial: Building and Securing Your First App

Running This Sample

To facilitate running this sample, I've left my own Auth0 configuration values in this repo. As such, you can simply run the following commands to run this sample:

# after cloning, move into this dir
cd react-tutorial

# install backend deps
cd backend
npm i

# run backend on the background
node src &

# install frontend deps
cd ../frontend
npm i

# run the frontend app
npm start

Running on Minikube

References:

Create all the resources (deployment, services, and ingress):

kubectl apply -f resources-manifests/deployment.yaml
kubectl apply -f resources-manifests/backend-service.yaml
kubectl apply -f resources-manifests/frontend-service.yaml
kubectl apply -f resources-manifests/ingress.yaml

Then, find out the IP address of the Minikube cluster:

minikube ip

Finally, head to a web browser and hit the IP address returned by the command above. Also, if needed you can use the following commands to shutdown everything:

kubectl delete -f resources-manifests/deployment.yaml
kubectl delete -f resources-manifests/backend-service.yaml
kubectl delete -f resources-manifests/frontend-service.yaml
kubectl delete -f resources-manifests/ingress.yaml

About

License:MIT License


Languages

Language:JavaScript 88.3%Language:HTML 7.4%Language:Dockerfile 2.5%Language:CSS 1.8%