Skip to content

Commit

Permalink
feat: remove http server
Browse files Browse the repository at this point in the history
  • Loading branch information
emialonzo committed May 27, 2021
1 parent 46cca75 commit 2eafa99
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class App {
public connectionName: string;
public io: SocketIO.Server;
private server: Server;
// private https: any;
private https: HttpsServer;

public initedDB: boolean = false;
Expand All @@ -50,7 +49,6 @@ class App {
}

this.port = Number.parseInt(process.env.PORT) //|| port;
this.httpPort = Number.parseInt(process.env.HTTP_PORT) //|| port;
this.connectionName = process.env.DATABASE_CONNECTION_NAME //|| connName;

console.log(`Constructor-> port:${this.port} connName:${this.connectionName}`)
Expand Down Expand Up @@ -202,25 +200,7 @@ class App {
this.io = Io(this.https)
let io = this.io;
io.use(authMiddleware)

// let http_io = Io(this.server)
// // let io = this.io;
// http_io.use(authMiddleware)



// this.app.get('/form', function (req, res) {
// res.sendFile(__dirname + '/pruebaForm/forms.html');
// });


this.server.listen(this.httpPort, () => {
console.log(`Server running on port ${JSON.stringify(this.server.address())}`);
if (!this.initedRest && ( callback !== undefined)) {
this.initedRest = true;
callback();
}
});


this.https.listen(port, () => {
console.log(`Server running on port ${JSON.stringify(this.https.address())}`);
Expand Down

0 comments on commit 2eafa99

Please sign in to comment.