You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
468 B
JavaScript
16 lines
468 B
JavaScript
import {DynDnsBot} from './DynDnsBot.js';
|
|
import {loadData, storeData} from './jsonDataStore.js';
|
|
|
|
let configPath = 'config.json';
|
|
let config = loadData(configPath);
|
|
|
|
let configProxy = new Proxy(config, {
|
|
set: (target, key, value) => {
|
|
console.log(`config changed: ${key} set from ${target[key]} to ${value}`);
|
|
target[key] = value;
|
|
storeData(config, configPath);
|
|
return true;
|
|
}
|
|
});
|
|
let bot = new DynDnsBot({config: configProxy});
|
|
bot.setInterval(); |