update serviceUrl to the success port (#439)

* update serviceUrl to the success port

* correct log
This commit is contained in:
Hoan Luu Huu
2023-08-30 20:23:35 +07:00
committed by GitHub
parent 90df33a15c
commit a03baa8461

View File

@@ -6,7 +6,8 @@ const {PORT, HTTP_PORT_MAX} = require('../config');
const doListen = (logger, app, port, resolve) => {
const server = app.listen(port, () => {
const {srf} = app.locals;
logger.info(`listening for HTTP requests on port ${PORT}, serviceUrl is ${srf.locals.serviceUrl}`);
srf.locals.serviceUrl = `http://${srf.locals.ipv4}:${port}`;
logger.info(`listening for HTTP requests on port ${port}, serviceUrl is ${srf.locals.serviceUrl}`);
resolve({server, app});
});
return server;