1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-03-02 02:31:35 +00:00

Add config overrides file

This commit is contained in:
Cadence Ember 2020-11-20 18:27:38 +13:00
parent d806eb0426
commit ca8d26c722
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
5 changed files with 35 additions and 2 deletions

View file

@ -1,4 +1,6 @@
const constants = {
const mixin = require("mixin-deep")
let constants = {
user_settings: {
instance: {
type: "string",
@ -34,4 +36,11 @@ const constants = {
}
}
try {
const overrides = require("../config/config.js")
constants = mixin(constants, overrides)
} catch (e) {
console.log("Note: overrides file `config/config.js` ignored, file not found.")
}
module.exports = constants