mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +00:00
Merge pull request #505 from Tria-plc/freight/feature/first_mile_invoice
Freight/feature/first mile invoice
This commit is contained in:
@@ -31,9 +31,10 @@ export class Gt06Server implements OnApplicationBootstrap, OnModuleDestroy {
|
|||||||
this.logger.log('GT06 TCP listener disabled (GT06_TCP_PORT=0)');
|
this.logger.log('GT06 TCP listener disabled (GT06_TCP_PORT=0)');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const host = process.env.GT06_TCP_HOST ?? '0.0.0.0';
|
||||||
this.server = net.createServer((socket) => this.onConnection(socket));
|
this.server = net.createServer((socket) => this.onConnection(socket));
|
||||||
this.server.on('error', (err) => this.logger.error(`GT06 server error: ${String(err)}`));
|
this.server.on('error', (err) => this.logger.error(`GT06 server error: ${String(err)}`));
|
||||||
this.server.listen(port, () => this.logger.log(`GT06 GPS tracker listener on tcp/${port}`));
|
this.server.listen(port, host, () => this.logger.log(`GT06 GPS tracker listener on ${host}:${port}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
onModuleDestroy(): void {
|
onModuleDestroy(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user