Skip to content

Commit

Permalink
properly defined PRODUCTION_URL_APP on client async-labs#18
Browse files Browse the repository at this point in the history
  • Loading branch information
tima101 committed Apr 26, 2019
1 parent c5f1522 commit 110ed37
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ To deploy the two apps (`api` and `app`), follow the instructions below.
"PRODUCTION_URL_API": "https://your-api-url.com",
"BUCKET_FOR_POSTS": "xxxxxx",
"BUCKET_FOR_TEAM_AVATARS": "xxxxxx",
"LAMBDA_API_ENDPOINT": "xxxxxx",
"LAMBDA_API_ENDPOINT": "xxxxxx",
},
"alias": "your-app-url.com",
"scale": {
Expand Down
6 changes: 4 additions & 2 deletions app/components/discussions/CreateDiscussionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import Router from 'next/router';
import NProgress from 'nprogress';
import React from 'react';

import env from '../../lib/env';

import notify from '../../lib/notifier';
import { Store } from '../../lib/store';
import PostEditor from '../posts/PostEditor';
import MemberChooser from '../users/MemberChooser';

const dev = process.env.NODE_ENV !== 'production';
const { PRODUCTION_URL_APP } = process.env;
const { NODE_ENV, PRODUCTION_URL_APP } = env;
const dev = NODE_ENV !== 'production';
const URL_APP = dev ? 'http://localhost:3000' : PRODUCTION_URL_APP;

const styles = {
Expand Down
6 changes: 4 additions & 2 deletions app/components/posts/PostForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import { inject, observer } from 'mobx-react';
import NProgress from 'nprogress';
import React from 'react';

import env from '../../lib/env';

import notify from '../../lib/notifier';
import { Discussion, Post, Store, User } from '../../lib/store';

import PostEditor from './PostEditor';

const dev = process.env.NODE_ENV !== 'production';
const { PRODUCTION_URL_APP } = process.env;
const { NODE_ENV, PRODUCTION_URL_APP } = env;
const dev = NODE_ENV !== 'production';
const URL_APP = dev ? 'http://localhost:3000' : PRODUCTION_URL_APP;

const styles = {
Expand Down
2 changes: 2 additions & 0 deletions app/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React from 'react';
import flush from 'styled-jsx/server';

const {
NODE_ENV,
GA_TRACKING_ID,
PRODUCTION_URL_APP,
PRODUCTION_URL_API,
Expand All @@ -14,6 +15,7 @@ const {
} = process.env;

const env = {
NODE_ENV,
GA_TRACKING_ID,
PRODUCTION_URL_APP,
PRODUCTION_URL_API,
Expand Down

0 comments on commit 110ed37

Please sign in to comment.