Skip to content

Commit 31ad9fa

Browse files
Mutugiiidogi
andauthored
all: smoother npm run dev (fixes #9055) (#9057)
Co-authored-by: dogi <[email protected]>
1 parent 107ac3b commit 31ad9fa

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

dev-env.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ set -euo pipefail
55
[ -f .env ] && source .env
66

77
CHAT_PORT="${CHAT_PORT:-5000}"
8+
COUCH_PORT="${COUCH_PORT:-2200}"
9+
PARENT_PROTOCOL="${PARENT_PROTOCOL:-https}"
810

911
sed \
1012
-e "s/{{CHAT_PORT}}/${CHAT_PORT}/g" \
13+
-e "s/{{COUCH_PORT}}/${COUCH_PORT}/g" \
14+
-e "s/{{PARENT_PROTOCOL}}/${PARENT_PROTOCOL}/g" \
1115
src/environments/environment.template > src/environments/environment.dev.ts
1216

1317
echo "chatapi running on port: ${CHAT_PORT}"
18+
echo "couchdb running on port: ${COUCH_PORT}"
19+
echo "parent protocol: ${PARENT_PROTOCOL}"

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "planet",
33
"license": "AGPL-3.0",
4-
"version": "0.20.17",
4+
"version": "0.20.18",
55
"myplanet": {
6-
"latest": "v0.30.63",
7-
"min": "v0.29.63"
6+
"latest": "v0.30.73",
7+
"min": "v0.29.73"
88
},
99
"scripts": {
1010
"ng": "ng",
1111
"ng-high-memory": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng",
1212
"start": "ng serve",
13-
"dev": "bash dev-env.sh && ng serve",
13+
"dev": "bash dev-env.sh && ng serve --configuration dev",
1414
"build": "npm run ng-high-memory -- build --configuration production",
1515
"test": "ng test",
1616
"htmlhint": "./node_modules/htmlhint-ng2/bin/htmlhint --config .htmlhintrc",

src/environments/environment.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ export const environment = {
22
production: false,
33
test: false,
44
chatAddress: window.location.protocol + '//' + window.location.hostname + ':{{CHAT_PORT}}',
5-
couchAddress: window.location.protocol + '//' + window.location.hostname + ':2200',
5+
couchAddress: window.location.protocol + '//' + window.location.hostname + ':{{COUCH_PORT}}',
66
centerAddress: 'planet.earth.ole.org/db',
77
centerProtocol: 'https',
8-
parentProtocol: 'https',
8+
parentProtocol: '{{PARENT_PROTOCOL}}',
99
upgradeAddress: window.location.origin + '/upgrade',
1010
syncAddress: window.location.protocol + '//localhost:5984'
1111
};

0 commit comments

Comments
 (0)