Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
fix(stateConfig): incorrect env var for dev-proxy port (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
infoxicator committed Jun 24, 2020
1 parent c12db6f commit 3620a1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/utils/stateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ const pathToDevEndpoints = path.join(process.cwd(), '.dev', 'endpoints', 'index.
const stateConfigFromDevEndpoints = {};

if (process.env.NODE_ENV === 'development' && fs.existsSync(pathToDevEndpoints)) {
const { SERVICES_PORT = 3002 } = process.env;
const { HTTP_ONE_APP_DEV_PROXY_SERVER_PORT = 3002 } = process.env;
// eslint-disable-next-line global-require,import/no-dynamic-require
const devEndpoints = require(pathToDevEndpoints)();
Object.entries(devEndpoints).forEach(([configName, { devProxyPath }]) => {
const value = url.format({
protocol: 'http',
hostname: 'localhost',
port: SERVICES_PORT,
port: HTTP_ONE_APP_DEV_PROXY_SERVER_PORT,
pathname: devProxyPath,
});
stateConfigFromDevEndpoints[configName] = value;
Expand Down

0 comments on commit 3620a1a

Please sign in to comment.