- Made configs work! configs: - debug - logging - logfile - ipget_endpoint_set - ipget_endpoint_get - site_name - search_enable - post_ranking_auto - index_post_sort - comment_sync_on_write - comment_auto_sync - logging framework! loglevels: - -1 - none - 0 - basic - 10 - datahorder - 1337 - haxxer now just logging commands!
17 lines
313 B
JavaScript
17 lines
313 B
JavaScript
const yaml = require("js-yaml")
|
|
const fs = require("fs")
|
|
|
|
try {
|
|
let configfile = fs.readFileSync("config/config.yaml", "utf8")
|
|
data = yaml.load( configfile )
|
|
} catch {
|
|
console.log("Couldn't read config file!")
|
|
console.log("Abort!")
|
|
process.exit(0)
|
|
}
|
|
|
|
module.exports = data
|
|
module.exports.sync = () => {
|
|
|
|
}
|