Skip to content

Commit 63a03d1

Browse files
TCA-517 #comment This commit changes the default config to use port ssl and changes my personal config name so that others won't use it. #time 15m
1 parent c18c6f9 commit 63a03d1

File tree

11 files changed

+27
-19
lines changed

11 files changed

+27
-19
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ You can verify the versions of `nvm`, `node`, and `npm` using the commands below
6262
| `% nvm current` | v15.15.0 |
6363

6464

65+
>**NOTE:** The `yarn start` command requires the `NVM_DIR` env variable is set.
66+
67+
```zsh
68+
export NVM_DIR=~/.nvm
69+
```
70+
71+
If you don't have this set globally, you can create your own [personal config](#personal-config) to define your local nvm dir.
72+
6573
### Hosting
6674
You will need to add the following line to your hosts file. The hosts file is normally located at `/etc/hosts` (Mac). Do not overwrite the existing localhost entry also pointing to 127.0.0.1.
6775

@@ -81,9 +89,9 @@ You will need to add the following line to your hosts file. The hosts file is no
8189
8290
>% yarn start
8391
84-
3. Go to https://local.topcoder-dev.com:3000
92+
3. Go to https://local.topcoder-dev.com
8593

86-
>**NOTE**: The default port is 3000, but you can override it in your [personal config](#personal-config).
94+
>**NOTE**: The must run on port 443 in order for auth0 to work and for the site to load properly. Mac users will need to run the app with elevated permissions.
8795
8896
### Local SSL
8997

@@ -102,7 +110,7 @@ Otherwise, you will need to override the exception each time you load the site.
102110
### Personal Config
103111

104112
1. Add [hostname] to [`/src-ts/config/environments/app-host-environment.type.ts`](/src-ts/config/environments/app-host-environment.type.ts)
105-
2. Copy an existing config from [`/src-ts/config/environments/environment.*.config.ts`](/src-ts/config/environments/environment.bsouza.config.ts)
113+
2. Copy an existing config from [`/src-ts/config/environments/environment.*.config.ts`](/src-ts/config/environments/environment.brooke.config.ts)
106114
3. Rename new config `environment.[hostname].config.ts`
107115
4. Rename config variable to `EnvironmentConfig[HostName]`
108116
5. Set the `ENV` variable to `[hostname]`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "yarn react-app-rewired start",
77
"start": "sh start-ssl.sh",
8-
"start:bsouza": "sudo sh start-ssl-bsouza.sh",
8+
"start:brooke": "sudo sh start-ssl-brooke.sh",
99
"build": "yarn react-app-rewired build",
1010
"lint": "tslint 'src-ts/**/*.{ts,tsx}' && eslint 'src*/**/*.{js,jsx,ts,tsx}'",
1111
"lint:fix": "tslint 'src-ts/**/*.{ts,tsx}' --fix && eslint 'src*/**/*.{js,jsx,ts,tsx}' --fix",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type AppHostEnvironmentType = 'bsouza' | 'default' | 'dev' | 'prod'
1+
export type AppHostEnvironmentType = 'brooke' | 'default' | 'dev' | 'prod'
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { EnvironmentConfigModel } from './environment-config.model'
22
import { EnvironmentConfigDefault } from './environment.default.config'
33

4-
export const EnvironmentConfigBsouza: EnvironmentConfigModel = {
4+
export const EnvironmentConfigBrooke: EnvironmentConfigModel = {
55
...EnvironmentConfigDefault,
6-
ENV: 'bsouza',
6+
ENV: 'brooke',
77
}

src-ts/config/environments/environment.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AppHostEnvironmentType } from './app-host-environment.type'
22
import { EnvironmentConfigModel } from './environment-config.model'
3-
import { EnvironmentConfigBsouza } from './environment.bsouza.config'
3+
import { EnvironmentConfigBrooke } from './environment.brooke.config'
44
import { EnvironmentConfigDefault } from './environment.default.config'
55
import { EnvironmentConfigDev } from './environment.dev.config'
66
import { EnvironmentConfigProd } from './environment.prod.config'
@@ -12,8 +12,8 @@ function getEnvironmentConfig(): EnvironmentConfigModel {
1212

1313
switch (environment) {
1414

15-
case 'bsouza':
16-
return EnvironmentConfigBsouza
15+
case 'brooke':
16+
return EnvironmentConfigBrooke
1717

1818
case 'default':
1919
return EnvironmentConfigDefault

src-ts/tools/learn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Learn tool has its own configuration defined in the [/src-ts/tools/learn/lea
66

77
The default configuration expects both the FCC Client and API to be running locally. In most cases, developers probably won't want to run both locally.
88

9-
>**See** [/src-ts/tools/learn/learn-config/learn.bsouza.config.ts](/src-ts/tools/learn/learn-config/learn.bsouza.config.ts) for an example of how to override the FCC source URLs to use the dev env config.
9+
>**See** [/src-ts/tools/learn/learn-config/learn.brooke.config.ts](/src-ts/tools/learn/learn-config/learn.brooke.config.ts) for an example of how to override the FCC source URLs to use the dev env config.
1010
1111
>**See** the [main app README](/README.md#personal-config) for instructions for creating a personal config.
1212

src-ts/tools/learn/learn-config/learn.bsouza.config.ts renamed to src-ts/tools/learn/learn-config/learn.brooke.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { LearnConfigModel } from './learn-config.model'
22
import { LearnConfigDefault } from './learn.default.config'
33
import { LearnConfigDev } from './learn.dev.config'
44

5-
export const LearnConfigBsouza: LearnConfigModel = {
5+
export const LearnConfigBrooke: LearnConfigModel = {
66
...LearnConfigDev,
77
// API: LearnConfigDefault.API,
88
CLIENT: LearnConfigDefault.CLIENT,

src-ts/tools/learn/learn-config/learn.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { EnvironmentConfig } from '../../../config'
22

33
import { LearnConfigModel } from './learn-config.model'
4-
import { LearnConfigBsouza } from './learn.bsouza.config'
4+
import { LearnConfigBrooke } from './learn.brooke.config'
55
import { LearnConfigDefault } from './learn.default.config'
66
import { LearnConfigDev } from './learn.dev.config'
77
import { LearnConfigProd } from './learn.prod.config'
@@ -10,8 +10,8 @@ function getConfig(): LearnConfigModel {
1010

1111
switch (EnvironmentConfig.ENV) {
1212

13-
case 'bsouza':
14-
return LearnConfigBsouza
13+
case 'brooke':
14+
return LearnConfigBrooke
1515

1616
case 'dev':
1717
return LearnConfigDev

start-ssl-brooke.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export REACT_APP_HOST_ENV=brooke
2+
export NVM_DIR=~/.nvm
3+
sh ./start-ssl.sh

start-ssl-bsouza.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)