• Log inStart now

On August 31, 2024, we're EOLing developer.newrelic.com. All relevant content has been migrated to docs.newrelic.com.

Spin up your demo services

5 min


This lesson is part of a course that teaches you how to build a New Relic application from the ground up. If you haven't already, check out the course introduction.

Before you build your New Relic application, you need to spin up your demo services. This coursework depends on two important services:

  • A web service that shows a newsletter signup form. The form's heading text alternates between two versions because you're performing an A/B test to determine which text leads to more high-quality subscriptions.
  • A simulator service that sends steady traffic to the website so that you don't have to manually generate data

To spin up your demo services, you first need to install Docker and Docker compose.

Spin up your demo services

Step 1 of 5

Clone the coursework repository from GitHub:

git clone https://github.com/newrelic-experimental/nru-programmability-course

This repository contains code for creating NodeJS New Relic automations. It also contains a an app code directory for each lesson in the course. You'll use these directories to follow along with the course content.

Step 2 of 5

Change to the demo directory, called ab-test-app:

cd nru-programmability-course/ab-test-app

This directory contains configuration files and READMEs for using the demo.

Step 3 of 5

Build and run the web service and simulator containers, using docker-compose:

NEW_RELIC_LICENSE_KEY=<your New Relic license key> docker-compose up -d


Make sure you replace <your New Relic license key> with your actual license key.

Once it's finished, view the website at localhost:3001:

Demo service

Step 4 of 5

Visit New Relic, and navigate to APM in the top navigation menu. Select Newsletter from the list of instrumented services:

Newsletter APM service

You may have to wait a minute or two for New Relic to receive data from your demo services. Once it's ready, you'll see transaction data, such as performance, throughput, and an Apdex score:

Newsletter APM transactions

Step 5 of 5

To spin down your demo services, run docker-compose down from your ab-test-app directory:

docker-compose down

Now you're ready to build your New Relic application!


This lesson is part of a course that teaches you how to build a New Relic application from the ground up. Continue on to the next lesson: Install and configure the New Relic One CLI.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.