Update index.js

This commit is contained in:
Andras Bacsai
2024-03-15 20:44:41 +01:00
committed by GitHub
parent bb3011414d
commit ad6163740f

View File

@@ -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'