The goal of Helper is to ensure that I am able to be the Hands and Feet of God and to help others do the same.
We have split the Client and the API. The Client is responsible for serving the Server-Side rendered Markup, along with handling any HTTP requests that the Browser makes, such as Form Submitions (Functions) or dynamic pages (Pages). The API is responsible for understanding and serving the Data Layer (PSQL) and for handling any authorization needed.
You can develop using K8s/Docker locally via Minikube and K9s.
minikube start --addons=ingress,metrics-server --cpus=max
![Expected Output](./artifacts/Screenshot from 2022-08-27 10.45.20.png)
k9s
This will make all docker commands typed in the shell session to be able
to be reached by Minikube. Specifically, this will allow you to run
docker build
and docker tag
commands and then have Minikube "pull" the
Images from that output.
Do this in a shell that you will have open forever and that you don't mind running any docker commands on
eval $(minikube docker-env)
# build client and tag it mckp/helper-client
# using the file Client.Dockerfile
# and using the context of this current directory
docker build -t mckp/helper-client -f Client.Dockerfile .
# You can also run
# ./scripts/build-client
# build api and tag it mckp/helper-api
# using the file API.Dockerfile
# and using the context of this current directory
docker build -t mckp/helper-api -f API.Dockerfile .
# You can also run
# ./scripts/build-api
# You can build thema ll via
./scripts/build-services
kubectl apply -k ./k8s
Should cause pods to be created in your Minikube cluster
You should be able to set your /etc/hosts
file to point the
helper.local
to the minikube ip
address:
192.168.49.2 helper.local
If you have your own PSQL instance running along with your own Node install
and want to run the services locally on your machine, you are free to use Yarn
to install and run the projects via yarn
to install the deps and yarn dev
to run in development mode:
cd client && yarn
cd ../
cd api && yarn
cd ../
# In one terminal
cd client && yarn dev
# In another terminal
cd api && yarn dev