From f0497ec16dd2b892ba8cddd523488500133a81c4 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 17 Nov 2015 15:49:45 +0100 Subject: [PATCH] Move default configuration to config.json. --- config.json | 14 ++++++++++++++ src/index.js | 11 ----------- 2 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 config.json diff --git a/config.json b/config.json new file mode 100644 index 000000000..8ff0f3a97 --- /dev/null +++ b/config.json @@ -0,0 +1,14 @@ +// Vendor config: DO NOT TOUCH! +// +// See sample.config.yaml to override. +{ + "http": { + "listen": [ + { + "port": 80 + } + ], + "mounts": {} + }, + "datadir": "/var/lib/xo-server/data" +} diff --git a/src/index.js b/src/index.js index 74a7e627a..225b6c262 100644 --- a/src/index.js +++ b/src/index.js @@ -60,16 +60,6 @@ const warn = (...args) => { // =================================================================== -const DEFAULTS = { - http: { - listen: [ - { port: 80 } - ], - mounts: {} - }, - datadir: '/var/lib/xo-server/data' -} - const DEPRECATED_ENTRIES = [ 'users', 'servers' @@ -77,7 +67,6 @@ const DEPRECATED_ENTRIES = [ async function loadConfiguration () { const config = await appConf.load('xo-server', { - defaults: DEFAULTS, ignoreUnknownFormats: true })