Ensure PORT is an integer

This commit is contained in:
Olli Vanhapiha 2018-03-15 22:30:38 +02:00
parent d55cc7b250
commit 42aeefd487
3 changed files with 6 additions and 6 deletions

View file

@ -34,8 +34,8 @@ an .env file. The client application will only be packaged with env variables th
REACT_APP. This way server secrets don't end up in client bundles.
**With deploys note that the configuration options are bundled in the
client at build time.**** The configuration of the build environment
must match run environment for things to work consistently. To apply
changes to configuration values client bundle must be rebuilt. Just
restarting the server is not enough.
client package at build time.** The configuration of the build
environment must match run environment for things to work
consistently. To apply changes to configuration values client bundle
must be rebuilt. Just restarting the server is not enough.

View file

@ -40,7 +40,7 @@ const csp = require('./csp');
const buildPath = path.resolve(__dirname, '..', 'build');
const env = process.env.REACT_APP_ENV;
const dev = process.env.REACT_APP_ENV === 'development';
const PORT = process.env.PORT;
const PORT = parseInt(process.env.PORT, 10);
const CLIENT_ID = process.env.REACT_APP_SHARETRIBE_SDK_CLIENT_ID;
const BASE_URL = process.env.REACT_APP_SHARETRIBE_SDK_BASE_URL;
const USING_SSL = process.env.REACT_APP_SHARETRIBE_USING_SSL === 'true';

View file

@ -2,7 +2,7 @@ const path = require('path');
const moment = require('moment');
const buildPath = path.resolve(__dirname, '..', 'build');
const PORT = process.env.PORT;
const PORT = parseInt(process.env.PORT, 10);
const USING_SSL = process.env.REACT_APP_SHARETRIBE_USING_SSL === 'true';
/**