Skip to content
Snippets Groups Projects
Commit 4f251508 authored by michael.minelli's avatar michael.minelli
Browse files

Add Config class

parent a1393fe5
Branches
Tags
No related merge requests found
import * as os from 'os';
class Config {
private static _instance: Config;
public readonly apiURL: string;
public readonly localConfig: {
folder: string; file: string;
};
private constructor() {
this.apiURL = process.env.API_URL || '';
this.localConfig = {
folder: (process.env.LOCAL_CONFIG_FOLDER || '').replace('~', os.homedir()),
file : process.env.LOCAL_CONFIG_FILE || ''
};
}
public static get instance(): Config {
if ( !Config._instance ) {
Config._instance = new Config();
}
return Config._instance;
}
}
export default Config.instance;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment