mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Removing environment specific config (#266)
This commit is contained in:
parent
a0a911d9b2
commit
9312247661
4 changed files with 2 additions and 26 deletions
|
|
@ -1,5 +0,0 @@
|
|||
import { environments } from './index.js';
|
||||
|
||||
export default {
|
||||
env: environments.development,
|
||||
};
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import { environments } from './index.js';
|
||||
|
||||
export default {
|
||||
env: environments.production,
|
||||
};
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
export const environments = {
|
||||
development: 'DEV',
|
||||
production: 'PROD',
|
||||
};
|
||||
const env = process.env.NODE_ENV || environments.development;
|
||||
const configFileLocation = `./config.${env}.js`;
|
||||
const settings = require(configFileLocation).default;
|
||||
|
||||
export default { environments, settings };
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
import config from '../config';
|
||||
|
||||
const { window } = global;
|
||||
const { settings } = config;
|
||||
|
||||
const local = {
|
||||
clear: () => {
|
||||
|
|
@ -11,15 +8,13 @@ const local = {
|
|||
},
|
||||
getItem: (itemName) => {
|
||||
const { localStorage } = window;
|
||||
const { env } = settings;
|
||||
|
||||
return localStorage.getItem(`KOLIDE-${env}::${itemName}`);
|
||||
return localStorage.getItem(`KOLIDE::${itemName}`);
|
||||
},
|
||||
setItem: (itemName, value) => {
|
||||
const { localStorage } = window;
|
||||
const { env } = settings;
|
||||
|
||||
return localStorage.setItem(`KOLIDE-${env}::${itemName}`, value);
|
||||
return localStorage.setItem(`KOLIDE::${itemName}`, value);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue