Move default configuration to config.json.
This commit is contained in:
parent
7e9e179fa7
commit
f0497ec16d
14
config.json
Normal file
14
config.json
Normal file
@ -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"
|
||||
}
|
11
src/index.js
11
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
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user