When I serve the web-app on port 3330, I can make the webapp working on port 3333 using --proxy ./src/proxy.config.json, but I don't know how to make http-server to make to work at the same way
"start": "ng serve -o --port 3330 --watch --proxy-config ./src/proxy.config.json",
"pwa": "http-server -p 8080 -c-1 dist/satoshi-pwa --proxy http://localhost:3333",
proxy.config.json:
{
"/api": {
"target": "http://localhost:3333",
"secure": false,
"changeOrigin": true,
"pathRewrite": {
"^/api": "/"
}
}
}
environment.ts:
export const environment = {
production: true,
apiUrl: 'http://localhost:3333/api'
};