From cfd8d4cc5eb1ba264b43b555c42017219cbba199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Thu, 28 Jan 2021 10:38:50 +0900 Subject: [PATCH] feat: using private key from environment --- utils/Jwt.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/Jwt.ts b/utils/Jwt.ts index d571e43..dad2e20 100644 --- a/utils/Jwt.ts +++ b/utils/Jwt.ts @@ -1,8 +1,7 @@ -import * as fs from 'fs' import * as jwt from 'jsonwebtoken' -const publicPem = fs.readFileSync('./public.pem') -const privateKey = fs.readFileSync('./private.key') +const publicPem = process.env.PUBLIC_PEM +const privateKey = process.env.PRIVATE_KEY export function sign(payload: string | Record, options?: JWTSignOption): string | null { try {