Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 283d587

Browse files
author
Maria Mattlin
committed
PROD-1536 #comment Added two shell scripts start-local.sh and start-local-proxy.sh and corresponding npm scripts
1 parent 9035527 commit 283d587

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

package-lock.json

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "@topcoder/mfe-header",
33
"scripts": {
44
"start": "node server.js",
5+
"start-local": "sh start-local.sh",
6+
"start-local-proxy": "sh start-local-proxy.sh",
57
"dev": "cross-env APPMODE=development webpack-dev-server",
68
"dev-https": "cross-env APPMODE=development webpack-dev-server --https",
79
"build": "webpack --mode=${APPMODE:-development} --env.config=${APPENV:-dev}",
@@ -84,4 +86,4 @@
8486
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.3",
8587
"tc-ui": "appirio-tech/tc-ui#feature/connectv2"
8688
}
87-
}
89+
}

start-local-proxy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
#Load nvm
3+
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
4+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5+
6+
nvm use
7+
local-ssl-proxy -n local.topcoder-dev.com -s 443 -t 8080

start-local.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
#Load nvm
3+
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
4+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5+
6+
export APPMODE="development"
7+
export APPENV="local"
8+
9+
nvm use
10+
npm i
11+
npm run dev

0 commit comments

Comments
 (0)