I am trying to mock service using server.js and the proxy.config.json file so I can use that mocked service in a Protractor test. The way I\'m going about it is having the test
I was finally able to solve my initial issue by creating an environmentE2E.ts file as such:
export const environment = {
production: false,
baseURL: 'http://localhost:49156'
};
adding the following in angular-cli.json file:
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"e2e": "environments/environmentE2E.ts" // Added only this line, the others were already there
}
and called the tests with the following command:
ng e2e --proxy-config proxy.config.json --environment e2e
Hope it helps others. Thank you.