This commit is contained in:
2021-11-17 17:25:54 +01:00
parent cbc8ab0325
commit 952f76e5ab
5 changed files with 141 additions and 7 deletions

View File

@@ -91,15 +91,15 @@ const config = convict({
},
// Local storage
assets: {
localAssets: {
doc: 'The path to the assets folder',
format: String,
default: './assets',
env: 'ASSETS',
env: 'LOCAL_ASSETS',
},
})
for (const file of ['morphus.yaml', 'morphus.yaml', 'morphus.json']) {
for (const file of ['morphus.yaml', 'morphus.yaml']) {
try {
config.loadFile(file)
break

View File

@@ -20,7 +20,7 @@ export async function init() {
if (!storage) {
switch (Config.storage) {
case StorageType.Local:
storage = new Local(Config.assets)
storage = new Local(Config.localAssets)
break
default:
throw new Error(`Unknown storage type: ${Config.storage}`)