My LoRaWAN Signal Mapping MSc summer project. This is a copy of the actual repository with personal information removed.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
770 B

"use strict";
import path from 'path';
import fs from 'fs';
import toml from '@iarna/toml';
import apply_settings from '../Helpers/apply_settings.mjs';
const root_dir = path.dirname(process.argv[1]);
let filename_default = path.resolve(root_dir, "./settings.default.toml"),
filename_custom = path.resolve(root_dir, "../settings.toml");
fs.writeFileSync(filename_custom, `# Custom settings file. This file overrides server/settings.default.toml - refer there of example of settings you can override.\n\n`);
let settings = toml.parse(fs.readFileSync(filename_default, "utf-8")),
settings_override = toml.parse(fs.readFileSync(filename_custom, "utf-8"));
apply_settings(settings, settings_override);
export default settings;