mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
abstracted server start logging
This commit is contained in:
@@ -81,12 +81,16 @@ ROUTES.forEach((route: string) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function serverStarted() {
|
||||||
|
console.log(`[${new Date().toTimeString()}] Listening at ${ENV_CONFIG.ui.baseUrl}`);
|
||||||
|
}
|
||||||
|
|
||||||
function createHttpsServer(keys) {
|
function createHttpsServer(keys) {
|
||||||
https.createServer({
|
https.createServer({
|
||||||
key: keys.serviceKey,
|
key: keys.serviceKey,
|
||||||
cert: keys.certificate
|
cert: keys.certificate
|
||||||
}, app).listen(port, ENV_CONFIG.ui.host, () => {
|
}, app).listen(port, ENV_CONFIG.ui.host, () => {
|
||||||
console.log(`Listening at ${ENV_CONFIG.ui.baseUrl}`);
|
serverStarted();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +127,6 @@ if (ENV_CONFIG.ui.ssl) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
app.listen(port, ENV_CONFIG.ui.host, () => {
|
app.listen(port, ENV_CONFIG.ui.host, () => {
|
||||||
console.log(`[${new Date().toTimeString()}] Listening at ${ENV_CONFIG.ui.baseUrl}`);
|
serverStarted();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -69,12 +69,16 @@ ROUTES.forEach((route: string) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function serverStarted() {
|
||||||
|
console.log(`[${new Date().toTimeString()}] Listening at ${ENV_CONFIG.ui.baseUrl}`);
|
||||||
|
}
|
||||||
|
|
||||||
function createHttpsServer(keys) {
|
function createHttpsServer(keys) {
|
||||||
https.createServer({
|
https.createServer({
|
||||||
key: keys.serviceKey,
|
key: keys.serviceKey,
|
||||||
cert: keys.certificate
|
cert: keys.certificate
|
||||||
}, app).listen(port, ENV_CONFIG.ui.host, () => {
|
}, app).listen(port, ENV_CONFIG.ui.host, () => {
|
||||||
console.log(`Listening at ${ENV_CONFIG.ui.baseUrl}`);
|
serverStarted();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +115,6 @@ if (ENV_CONFIG.ui.ssl) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
app.listen(port, ENV_CONFIG.ui.host, () => {
|
app.listen(port, ENV_CONFIG.ui.host, () => {
|
||||||
console.log(`[${new Date().toTimeString()}] Listening at ${ENV_CONFIG.ui.baseUrl}`);
|
serverStarted();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user