remove getDynamicConfig (migrate to sol.enviconfig)

This commit is contained in:
陆柯 2021-09-12 09:55:14 +08:00
parent de8b9e1bf6
commit 5ae583d583

View File

@ -28,16 +28,6 @@ module.exports = {
return JSON.stringify(newEntity)
},
getDynamicConfig(dynamicConfigFile='ConfigDynamic.js') { // dynamicConfigFile should be absolute or relative to the node process's dir.
const fullpath = path.join(process.cwd(), dynamicConfigFile)
if (fs.existsSync(fullpath)) {
delete require.cache[require.resolve(fullpath)] // delete require.cache[fullpath] 不起作用
return require(fullpath)
} else {
return {}
}
},
name2port(name='') {
let port = name.toLowerCase()
.replace(/[abc]/g, 2)