remove base.tool, do not show ipv4 by default

This commit is contained in:
陆柯 2022-03-11 11:51:26 +08:00
parent b5de51a72d
commit 69d62271a1
2 changed files with 6 additions and 9 deletions

View File

@ -26,7 +26,6 @@
"morgan": "^1.9.0",
"serve-favicon": "^2.5.0",
"base.enviconfig": "git+https://git.faronear.org/npm/base.enviconfig",
"base.tool": "git+https://git.faronear.org/npm/base.tool",
"vhost": "^3.0.2"
},
"devDependencies": {

View File

@ -1,6 +1,5 @@
const fs = require('fs')
const path = require('path')
const tool4net = require('base.tool/tool4net.js')
const express = require('express')
const wo = (global.wo = {
@ -84,7 +83,6 @@ if (typeof wo.envi.ssl === 'string') {
/*** 启动 Web 服务 ***/
let webServer
let ipv4 = tool4net.getMyIp()
if ('http' === wo.envi.protocol) {
let portHttp = wo.envi.port || 80
webServer = require('http')
@ -94,7 +92,7 @@ if (typeof wo.envi.ssl === 'string') {
console.log(err)
} else {
console.log(
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttp} with IPv4=${ipv4} for ${wo.envi.prodev} environment`
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttp} for ${wo.envi.prodev} environment`
)
}
})
@ -115,7 +113,7 @@ if (typeof wo.envi.ssl === 'string') {
console.log(err)
} else {
console.log(
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttps} with IPv4=${ipv4} for ${wo.envi.prodev} environment`
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttps} for ${wo.envi.prodev} environment`
)
}
})
@ -139,7 +137,7 @@ if (typeof wo.envi.ssl === 'string') {
console.log(err)
} else {
console.log(
`[${new Date().toJSON()}] Server redirecting from http://${wo.envi.host}:${portHttp} with IPv4=${ipv4} for ${
`[${new Date().toJSON()}] Server redirecting from http://${wo.envi.host}:${portHttp} for ${
wo.envi.prodev
} environment`
)
@ -159,7 +157,7 @@ if (typeof wo.envi.ssl === 'string') {
console.log(err)
} else {
console.log(
`[${new Date().toJSON()}] Server listening on https://${wo.envi.host}:${portHttps} with IPv4=${ipv4} for ${
`[${new Date().toJSON()}] Server listening on https://${wo.envi.host}:${portHttps} for ${
wo.envi.prodev
} environment`
)
@ -177,7 +175,7 @@ if (typeof wo.envi.ssl === 'string') {
console.log(err)
} else {
console.log(
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttp} with IPv4=${ipv4} for ${wo.envi.prodev} environment`
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttp} for ${wo.envi.prodev} environment`
)
}
})
@ -203,7 +201,7 @@ if (typeof wo.envi.ssl === 'string') {
console.log(err)
} else {
console.log(
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttps} with IPv4=${ipv4} for ${wo.envi.prodev} environment`
`[${new Date().toJSON()}] Server listening on ${wo.envi.protocol}://${wo.envi.host}:${portHttps} for ${wo.envi.prodev} environment`
)
}
})