We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a149c5 commit c35fe71Copy full SHA for c35fe71
server/models/userModel.ts
@@ -7,9 +7,11 @@ dotenv.config();
7
8
const { USER_DB_USER, USER_DB_PW } = process.env;
9
const SSL_KEY =
10
- (process.env.SSL_KEY as string) || fs.readFileSync('./.cert/key.pem').toString();
+ Buffer.from(process.env.SSL_KEY as string, 'base64').toString('ascii') ||
11
+ fs.readFileSync('./.cert/key.pem').toString();
12
const SSL_CERT =
- (process.env.SSL_CERT as string) || fs.readFileSync('./.cert/cert.pem').toString();
13
+ Buffer.from(process.env.SSL_CERT as string, 'base64').toString('ascii') ||
14
+ fs.readFileSync('./.cert/cert.pem').toString();
15
16
const pool = mysql
17
.createPool({
0 commit comments