From ad6163740faafa296831a6f11d76554d97e93b3b Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 15 Mar 2024 20:44:41 +0100 Subject: [PATCH] Update index.js --- nodejs/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodejs/index.js b/nodejs/index.js index a5742aa..8d66b15 100644 --- a/nodejs/index.js +++ b/nodejs/index.js @@ -8,6 +8,10 @@ fastify.get('/', function (req, reply) { fastify.get('/env', function (req, reply) { return { env: process.env } }) +fastify.get('/env/:env', function (req, reply) { + const env = request.params.env + return { env: process.env[env] } +}) fastify.get('/health', function (req, reply) { return 'OK'