From 754eafc8dd91b2b6fbc43cfa959302e5cca26ca0 Mon Sep 17 00:00:00 2001 From: Adam McCrea Date: Mon, 20 May 2024 15:47:57 -0400 Subject: [PATCH] Rename the import variable --- sample_apps/fastify_web/README.md | 2 ++ sample_apps/fastify_web/app.js | 4 ++-- sample_apps/fastify_web/package-lock.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sample_apps/fastify_web/README.md b/sample_apps/fastify_web/README.md index 8ad8be6..7a08674 100644 --- a/sample_apps/fastify_web/README.md +++ b/sample_apps/fastify_web/README.md @@ -26,6 +26,8 @@ This will run both the app and a proxy server that adds the X-Request-Start head Visit the app through the proxy server: http://localhost:5004 +Reports are sent to Request Catcher—an API testing tool—instead of Judoscale. To view the reports that are sent, go to https://judoscale-node-sample.requestcatcher.com. + ## Local development To reference a local Judoscale package instead of the NPM version: diff --git a/sample_apps/fastify_web/app.js b/sample_apps/fastify_web/app.js index b26a6e4..3b5fdaf 100644 --- a/sample_apps/fastify_web/app.js +++ b/sample_apps/fastify_web/app.js @@ -1,5 +1,5 @@ import Fastify from 'fastify' -import judoscale from 'judoscale-fastify' +import judoscaleFastify from 'judoscale-fastify' const fastify = Fastify({ logger: { @@ -7,7 +7,7 @@ const fastify = Fastify({ }, }) -fastify.register(judoscale, { +fastify.register(judoscaleFastify, { log_level: process.env.LOG_LEVEL || 'debug', api_base_url: process.env.JUDOSCALE_URL || 'https://judoscale-node-sample.requestcatcher.com', }) diff --git a/sample_apps/fastify_web/package-lock.json b/sample_apps/fastify_web/package-lock.json index bad2ec5..3e0a9b2 100644 --- a/sample_apps/fastify_web/package-lock.json +++ b/sample_apps/fastify_web/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "fastify": "^4.26.2", - "judoscale-fastify": "^1.3.0" + "judoscale-fastify": "*" } }, "node_modules/@colors/colors": {