App for the day
Course: Kubernetes Part 3 (Scaling) - chapter 3
We’ll be creating a simple express app that does a CPU intensive task to see horizontal scaling in action.
import express from 'express';
const app = express();const BIG_VALUE = 10000000000;
app.get('/', (req, res) => { let ctr = 0; for (let i = 0; i < BIG_VALUE; i++) { ctr += 1; } res.send('Hello World!');});
app.listen(3000, () => { console.log('Server is running on port 3000');});The app is deployed at https://hub.docker.com/r/100xdevs/week-28