mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:27:09 +00:00
Make API config search path consistent with backend.
The API configuration now accepts the same DOUGAL_ROOT environment variable as the backend and uses the same path algorithm.
This commit is contained in:
@@ -2,7 +2,8 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
|
||||||
const cfgPath = process.env.DOUGAL_API_CONFIG || (process.env.HOME+"/etc/www/config.json");
|
const cfgPrefix = process.env.DOUGAL_ROOT || ((process.env.HOME || ".") + "/software");
|
||||||
|
const cfgPath = process.env.DOUGAL_API_CONFIG || (cfgPrefix+"/etc/www/config.json");
|
||||||
|
|
||||||
let config = {}
|
let config = {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user