fix: package and env var for server

This commit is contained in:
AP 2020-04-09 08:29:49 +02:00
parent 22196e8468
commit 7869863c12
2 changed files with 5 additions and 1 deletions

View file

@ -24,7 +24,10 @@ const ContentView = React.lazy(() => import('./sections/content/Content'));
toast.configure({ draggable: false }); toast.configure({ draggable: false });
const client = new ApolloClient({ const client = new ApolloClient({
uri: process.env.REACT_APP_API_URL ?? 'http://localhost:3001', uri:
process.env.REACT_APP_API_URL ?? process.env.NODE_ENV === 'production'
? 'https://api.thunderhub.io'
: 'http://localhost:3001',
}); });
const ContextApp: React.FC = () => { const ContextApp: React.FC = () => {

View file

@ -24,6 +24,7 @@
"@types/node-fetch": "^2.5.5", "@types/node-fetch": "^2.5.5",
"@types/underscore": "^1.9.4", "@types/underscore": "^1.9.4",
"apollo-server": "^2.11.0", "apollo-server": "^2.11.0",
"date-fns": "^2.0.0-beta.5",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"graphql-depth-limit": "^1.1.0", "graphql-depth-limit": "^1.1.0",
"graphql-iso-date": "^3.6.1", "graphql-iso-date": "^3.6.1",