Skip to content

Commit

Permalink
remove HTTPS for HTTP for test
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbryanyu committed Feb 13, 2024
1 parent fcd478b commit 65f9ec8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class App {
/**
* Pool of servers where we map port to server
*/
private serverPool: Map<number, https.Server>;
// private serverPool: Map<number, https.Server>;
private serverPool: Map<number, express.Express>;

/**
* Constructor for the backend application server {@link App}.
Expand All @@ -43,7 +44,8 @@ class App {
this.initializeMiddleWares();
this.mountRoutes();
// this.createProxy();
this.serverPool = new Map<number, https.Server>();
// this.serverPool = new Map<number, https.Server>();
this.serverPool = new Map<number, express.Express>();
}

/**
Expand Down Expand Up @@ -148,9 +150,10 @@ class App {
const credentials = { key: this.privateKey, cert: this.certificate };

Check failure on line 150 in backend/src/app.ts

View workflow job for this annotation

GitHub Actions / Lint Checks

'credentials' is assigned a value but never used

/* Add server to server pool and listen for connections */
const server = https.createServer(credentials, this.expressApp);
this.serverPool.set(port, server);
server.listen(port);
// const server = https.createServer(credentials, this.expressApp);
this.serverPool.set(port, this.expressApp);
this.expressApp.listen(port);
// server.listen(port);
logger.info(`Server is listening on port ${port}`);
} catch (error) {
logger.error('Error starting the server.', error);
Expand All @@ -166,7 +169,7 @@ class App {
if (this.serverPool.has(port)) {
const server = this.serverPool.get(port);
if (server) {
server.close();
// server.close();
}
}
}
Expand Down

0 comments on commit 65f9ec8

Please sign in to comment.