Initial commit
This commit is contained in:
38
remote/src/utils/config.js
Normal file
38
remote/src/utils/config.js
Normal file
@@ -0,0 +1,38 @@
|
||||
const newConfig = require('../config');
|
||||
|
||||
module.exports = {
|
||||
getServerConfig() {
|
||||
return newConfig.getSection('server') || {};
|
||||
},
|
||||
|
||||
getStreamConfig() {
|
||||
return newConfig.getSection('stream') || {};
|
||||
},
|
||||
|
||||
getInputConfig() {
|
||||
return newConfig.getSection('input') || {};
|
||||
},
|
||||
|
||||
getSecurityConfig() {
|
||||
return newConfig.getSection('security') || {};
|
||||
},
|
||||
|
||||
getFRPConfig() {
|
||||
return newConfig.getSection('frp') || { enabled: false };
|
||||
},
|
||||
|
||||
getConfig() {
|
||||
return newConfig.getAll();
|
||||
},
|
||||
|
||||
setConfig(newConfig) {
|
||||
return this.getConfig();
|
||||
},
|
||||
|
||||
get: newConfig.get,
|
||||
getSection: newConfig.getSection,
|
||||
getAll: newConfig.getAll,
|
||||
reload: newConfig.reload,
|
||||
clearCache: newConfig.clearCache,
|
||||
validate: newConfig.validate
|
||||
};
|
||||
Reference in New Issue
Block a user