A simple dockerized node-test application.
Go to file
Fred Boniface a1dfeb98ee First 2022-12-15 10:14:42 +00:00
node_modules First 2022-12-15 10:14:42 +00:00
.dockerignore First 2022-12-15 10:14:42 +00:00
Dockerfile First 2022-12-15 10:14:42 +00:00
README.md First 2022-12-15 10:14:42 +00:00
app.js First 2022-12-15 10:14:42 +00:00
package-lock.json First 2022-12-15 10:14:42 +00:00
package.json First 2022-12-15 10:14:42 +00:00

README.md

A simple dockerized node-test application.

On starting, each instance calculates a random number between 0-100. A simple GET request to the server responds with: node-test instance {randomNumber}.

Where you run a single instance of the container, it allows you to check connectivity with the Docker Host/Kubernetes Cluster.

Where you run multiple instances it allows you to visually see how any load balancing is working.

A Dockerfile is provided, or a package is available: git.fjla.uk/fred.boniface/node-test:latest.

An example deployment file for kubectl is also included - it will likely need changing for your environment. The example uses hostPort to expose the service, you may prefer to adapt it to use ingress or loadBalancer.