Skip to content

Commit b3513ed

Browse files
committed
Use BACKEND_API_URL env var for backend
1 parent 89657da commit b3513ed

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

.travis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,3 @@ os:
77
- linux
88
script:
99
- yarn test
10-
before_deploy:
11-
- rm -rf node_modules
12-
deploy:
13-
provider: heroku
14-
api_key:
15-
secure: sIe+wFvt7N8njuB8xtZzgFOZzla9UmlIz+0h84JRGyG4kE8VqIiqRlU3lXwGBWEIoKsIEIX4o3EHsRVIRplxw8oMRrfokwxQ9ZUtQP24MTJ4bevT8ypvhulEhUYGNtO16rFze8aslxaUlJUKz6ewHawK0ytpJQBMXfoeQuWVXOK6cv3Wa2ZG8D7WSoKEPtj6ZYhI180lcN0RP0+m+uOEPvhAvRStfyjPwmuQDp/aVnTlO/mhmOG/FVzAjeugyAwGEil9Ah5/fikkxy8dajGCU1O7YmgasnOrAuuDLno9ue1WOi0squzVqHgmkrTMJ1ckRml+MYH0q5SQSzGyigmSzeT9vg1jKrw0eMQxOArvu68KHWwcYn7cd9BkBWk+o43xuooAxsY3r98n0UHl2dxLd94ZngWNb/rWFFDEzDm417ltNXctdefbX9z64yl75IO/AMaXeiAzp9Gh+puz2UN+9+wRVAC2oZ6ITYIxjDKridmsyMWxURzgkatDAQupy9PaOG8AJSuDQMgTTyEXPYr+uWxVSioEODpOmO6hS4UiQ/TEa/yt/eB6tZVCiUY0waxx7sfF9DiaaF/U9W4HLHqTvMN6AOcWQJjMcemTvyH75xMN/n4Fc2xAT54ky7EvT6WyQMceNrCiAN6rghhkrOM5x4nHHGUokf63N4mTCtzjytQ=
16-
app: apollo-universal-starter-kit
17-
on:
18-
repo: sysgears/apollo-universal-starter-kit

docs/FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ git merge upstream/stable
4040

4141
## How do I use a custom GraphQL back end?
4242

43-
To set your custom GraphQL back end endpoint, set `API_URL` environment variable or change URL in `packages/server/build.config.js` for the `__API_URL__` property:
43+
To set your custom GraphQL back end endpoint, set `BACKEND_API_URL` environment variable or change URL in `packages/server/build.config.js` for the `__API_URL__` property:
4444

4545
```javascript
46-
__API_URL__: process.env.API_URL || '/graphql', // set the full URL to the external GraphQL API e.g. https://
46+
__API_URL__: process.env.BACKEND_API_URL || 'https://my-custom-domain/graphql', // set the full URL to the external GraphQL API e.g. https://
4747
```
4848

4949
We recommend that you still run the back-end code provided by the starter kit to use the server-side rendering (SSR).

packages/server/build.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const path = require('path');
2-
31
const config = {
42
...require('../../build.config'),
53
__CLIENT__: false,
@@ -8,10 +6,10 @@ const config = {
86
__TEST__: false,
97
'process.env.NODE_ENV': process.env.NODE_ENV || 'development',
108
__SERVER_PORT__: process.env.SERVER_PORT || process.env.PORT || 8080,
11-
__API_URL__: process.env.API_URL || '/graphql',
9+
__API_URL__: process.env.BACKEND_API_URL || '/graphql',
1210
__WEBSITE_URL__: process.env.WEBSITE_URL || 'http://localhost:3000',
1311
__CDN_URL__: process.env.CDN_URL || '',
14-
__FRONTEND_BUILD_DIR__: path.resolve(process.env.FRONTEND_BUILD_DIR || '../client/build')
12+
__FRONTEND_BUILD_DIR__: process.env.FRONTEND_BUILD_DIR || '../client/build'
1513
};
1614

1715
module.exports = config;

0 commit comments

Comments
 (0)