Skip to content

Commit

Permalink
fix(node): Update Proxy config port number
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham committed Feb 10, 2023
1 parent db7ee99 commit 83ab5d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/node/src/generators/application/application.spec.ts
Expand Up @@ -336,8 +336,8 @@ describe('app', () => {
expect(tree.exists('my-frontend/proxy.conf.json')).toBeTruthy();

expect(readJson(tree, 'my-frontend/proxy.conf.json')).toEqual({
'/api': { target: 'http://localhost:3333', secure: false },
'/billing-api': { target: 'http://localhost:3333', secure: false },
'/api': { target: 'http://localhost:3000', secure: false },
'/billing-api': { target: 'http://localhost:3000', secure: false },
});
});

Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/generators/application/application.ts
Expand Up @@ -219,7 +219,7 @@ function addProxy(tree: Tree, options: NormalizedSchema) {
JSON.stringify(
{
'/api': {
target: 'http://localhost:3333',
target: `http://localhost:${options.port}`,
secure: false,
},
},
Expand All @@ -234,7 +234,7 @@ function addProxy(tree: Tree, options: NormalizedSchema) {
const proxyModified = {
...JSON.parse(proxyFileContent),
[`/${options.name}-api`]: {
target: 'http://localhost:3333',
target: `http://localhost:${options.port}`,
secure: false,
},
};
Expand Down

0 comments on commit 83ab5d0

Please sign in to comment.