From cefe7fd48ba9be22b6c1614df4fc1a4e2556781f Mon Sep 17 00:00:00 2001 From: aelassas Date: Sun, 17 Mar 2024 21:03:17 +0000 Subject: [PATCH] Update index.ts --- api/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/index.ts b/api/src/index.ts index f528cc9e..278cddb2 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -2,7 +2,7 @@ import 'dotenv/config' import process from 'node:process' import fs from 'node:fs/promises' import http from 'node:http' -import https from 'node:https' +import https, { ServerOptions } from 'node:https' import app from './app' import * as databaseHelper from './common/databaseHelper' import * as env from './config/env.config' @@ -14,7 +14,7 @@ if (await databaseHelper.Connect(env.DB_URI, env.DB_SSL, env.DB_DEBUG)) { https.globalAgent.maxSockets = Number.POSITIVE_INFINITY const privateKey = await fs.readFile(env.PRIVATE_KEY, 'utf8') const certificate = await fs.readFile(env.CERTIFICATE, 'utf8') - const credentials = { key: privateKey, cert: certificate } + const credentials: ServerOptions = { key: privateKey, cert: certificate } server = https.createServer(credentials, app) server.listen(env.PORT, () => {