diff --git a/docs/env.md b/docs/env.md index 60c78ab2..33e28982 100644 --- a/docs/env.md +++ b/docs/env.md @@ -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. diff --git a/server/index.js b/server/index.js index a0fd6b52..bd9d9fac 100644 --- a/server/index.js +++ b/server/index.js @@ -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'; diff --git a/server/sitemap.js b/server/sitemap.js index fec85b3d..e3d10139 100644 --- a/server/sitemap.js +++ b/server/sitemap.js @@ -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'; /**