-
This commit is contained in:
parent
ff5f109544
commit
ae00a43c91
@ -1,21 +1,20 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
import path from 'path';
|
||||
import path from "path";
|
||||
|
||||
const enviroment = process.env.NODE_ENV || 'development';
|
||||
const isProduction = enviroment === 'production';
|
||||
const isDevelopment = enviroment === 'development';
|
||||
const environment = process.env.NODE_ENV || "development";
|
||||
const isProduction = environment === "production";
|
||||
const isDevelopment = environment === "development";
|
||||
|
||||
const enviromentConfig = require(path.resolve(
|
||||
__dirname,
|
||||
'environments',
|
||||
enviroment + '.ts'
|
||||
));
|
||||
// Determina la extensión de archivo según el entorno
|
||||
const extension = isProduction ? ".js" : ".ts";
|
||||
|
||||
const environmentConfig = require(path.resolve(__dirname, "environments", environment + extension));
|
||||
|
||||
export const config = Object.assign(
|
||||
{
|
||||
enviroment,
|
||||
isProduction,
|
||||
isDevelopment,
|
||||
},
|
||||
enviromentConfig
|
||||
{
|
||||
environment,
|
||||
isProduction,
|
||||
isDevelopment,
|
||||
},
|
||||
environmentConfig
|
||||
);
|
||||
|
||||
@ -23,7 +23,7 @@ export const currentState = assign(
|
||||
appPath: process.cwd(),
|
||||
//host: process.env.HOST || process.env.HOSTNAME || 'localhost',
|
||||
//port: process.env.PORT || 18888,
|
||||
environment: config.enviroment,
|
||||
environment: config.environment,
|
||||
connections: {},
|
||||
},
|
||||
config
|
||||
|
||||
Loading…
Reference in New Issue
Block a user