Express.js & Docker with dynamodb is a skeleton which could be used as a bae package to start a new project.
make start-serverThis Express.js application create a fully functional base application with a single endpoint for health check. To be able to deploy and run those on a kubernetes cluster.
NOTE: Execute the given commands, in the projects root directory
nvm install
corepack enable
yarn install| Endpoint | Description |
|---|---|
| /docs | For Swagger api documentation |
| /healthy | For health checks against the application |
- we are using Express v4 (v5 still in Beta1) so we have to use the package express-async-errors to be able to Error handle async route calls with the normal Error middleware
After you started the project and it is up and running the DynamoDb is also running to be able to have something like PhpMyAdmin or Adminer.
dynamodb-admin DYNAMO_ENDPOINT is not defined (using default of http://localhost:8000)
database endpoint: http://localhost:8000
region: local
accessKey: key
dynamodb-admin listening on http://:::8001 (alternatively http://0.0.0.0:8001)
(node:21757) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use `node --trace-warnings ...` to show where the warning was created) To visit the UI of Dynamodb-Admin you have to use localhost:8001 in this case
Link: Kind quick start guide
To install Kind on linux you can follow these steps: release page
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
# verify the installation
kind version
# Result should look like this
[12:15:42] [WSL/local] euronics-kurz ~$ kind version
kind v0.20.0 go1.20.4 linux/amd64kind create cluster # Default cluster context name is `kind-kind`Link: ArgoCD
Notice: before you're able to install ArgoCD on you local Kind - Cluster you have to install kubectl
kubectl config current-context # should be kind-kind(local kind cluster) not prod context or anything else
# if you have to switch the context do the following
kubectl config get-contexts
# pick the correct Kind name to switch to you local context
kubectl config use-context kind-kind
# install argocd on cluster
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/core-install.yamlLink: CLI installation
kubectl port-forward svc/argocd-server -n argocd 8080:443The initial password for the admin account is auto-generated and stored as clear text in the field password in a secret named argocd-initial-admin-secret in your Argo CD installation namespace. You can simply retrieve this password using the argocd CLI:
argocd admin initial-password -n argocdGo to locale ArgoCD
User: admin
PW: the one from the commandline above