This commit is contained in:
Alan Mosko
2023-07-26 10:58:13 -03:00
parent 03f3020e9f
commit 249aecbc0d
70 changed files with 9184 additions and 9768 deletions

View File

@@ -6,24 +6,24 @@ import * as https from 'https';
import { configService, SslConf } from '../config/env.config';
export class ServerUP {
static #app: Express;
static #app: Express;
static set app(e: Express) {
this.#app = e;
}
static set app(e: Express) {
this.#app = e;
}
static get https() {
const { FULLCHAIN, PRIVKEY } = configService.get<SslConf>('SSL_CONF');
return https.createServer(
{
cert: readFileSync(FULLCHAIN),
key: readFileSync(PRIVKEY),
},
ServerUP.#app,
);
}
static get https() {
const { FULLCHAIN, PRIVKEY } = configService.get<SslConf>('SSL_CONF');
return https.createServer(
{
cert: readFileSync(FULLCHAIN),
key: readFileSync(PRIVKEY),
},
ServerUP.#app,
);
}
static get http() {
return http.createServer(ServerUP.#app);
}
static get http() {
return http.createServer(ServerUP.#app);
}
}