remove getDynamicConfig (migrate to sol.enviconfig)
This commit is contained in:
parent
de8b9e1bf6
commit
5ae583d583
10
index.js
10
index.js
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user