Video Thumbnail for Lesson
6.2: Running the Demo Application

Running the Demo Application

The demo application lives in the course repository. Each service has Taskfile entries to make it easy to run locally.

1. Start the Postgres Database

Run the database in a container and create the schema used by the APIs:

# start the database
$ task postgresql:run-postgres

# run the migration to create the request table
$ task postgresql:run-psql-init-script

2. Launch the Backend APIs

Both APIs require the DATABASE_URL environment variable which points to the database started above.

Golang API

# install dependencies
$ task api-golang:install

# start the API on port 8000
$ task api-golang:run

Node.js API

# install dependencies
$ task api-node:install

# start the API on port 3000
$ task api-node:run

3. Start the React Frontend

The frontend makes requests to both APIs and displays the results.

# install dependencies
$ task client-react:install

# start the development server on port 5173
$ task client-react:run

Navigate to http://localhost:5173 in your browser and you should see the current time and request count from each API.

4. Optional: Generate Load

A simple Python script can continuously hit the Go API so you can see the counters increase automatically.

# install dependencies
$ task load-generator-python:install

# start generating requests
$ task load-generator-python:run

Once everything is running you will have a minimal multi-language web application that mirrors what we'll be deploying to Kubernetes in the following lessons.