From 992e9a7aef7a152535678bbfd989929a14738228 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 22 Sep 2025 10:05:33 +0200 Subject: [PATCH] Update index.js --- nodejs/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nodejs/index.js b/nodejs/index.js index 8922234..83f6ee1 100644 --- a/nodejs/index.js +++ b/nodejs/index.js @@ -6,9 +6,15 @@ fastify.get('/', function (req, reply) { console.log('hello'); return { hello: "from nodejs" } }) +fastify.get('/300', function (req, reply) { + return reply.code(300).header('Content-Type', 'application/json; charset=utf-8').send({ hello: '300' }) +}) fastify.get('/401', function (req, reply) { return reply.code(401).header('Content-Type', 'application/json; charset=utf-8').send({ hello: '401' }) }) +fastify.get('/500', function (req, reply) { + return reply.code(500).header('Content-Type', 'application/json; charset=utf-8').send({ hello: '500' }) +}) fastify.get('/env', function (req, reply) { return { env: process.env } })