This is a project for me to learn about the interaction between Node.js and TypeScript.
- Create a simple web app using TypeScript and Node.js
- Serve the web app within a Docker container
- Deploy the containerized web app to the cloud using AKS
A lot of the configuration for this app has been referenced from microsoft/TypeScript-Node-Starter, but I am keeping it as simple as possible.
- Install dependencies
npm i
- Run the server in Dev Mode
npm run watch
- Check that it's working by going to localhost:8080 in your browser. You should see
"Hello, World!"
.
- Make sure you have Docker Desktop installed.
- Build the app and Docker image
npm run build
- Serve the app in a docker container
npm run serve-docker
- Check that it's working by going to localhost:8080 in your browser. You should see
"Hello, World!"
.
- Make sure you have Azure CLI installed.
- Authorize your local Azure CLI
az login
- Install Kubernetes CLI
az aks install-cli
- Duplicate
.env.example
as.env
cp .env.example .env
- Edit
.env
to reflect desired values - Provision the necessary resources
./scripts/provision-resources.sh
- Deploy the app to Kubernetes
./scripts/deploy.sh
- Test the live app by going to the
EXTERNAL-IP
listed following this command
kubectl get service ts-node-poc --watch