"start:dist" script to run production build

This commit is contained in:
Denys Vuika 2017-10-19 20:49:14 +01:00
parent be68ec5e3f
commit 33e27d2e57
2 changed files with 23 additions and 1 deletions

View File

@ -8,7 +8,8 @@
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"start:dist": "wsrv"
},
"private": true,
"dependencies": {

21
wsrv-config.js Normal file
View File

@ -0,0 +1,21 @@
module.exports = {
"host": "0.0.0.0",
"port": 3000,
"dir": "./dist",
"spa": true,
"proxy": {
"/alfresco/{p*}": {
"options": {
"uri": "http://0.0.0.0:8080/alfresco/{p}"
}
}
},
onResHeaders(headers) {
if (headers) {
const authHeader = headers['www-authenticate'];
if (authHeader) {
headers['www-authenticate'] = `x${authHeader}`;
}
}
}
}