From 83ab5d0314ee584587e1eac5cd43bf42d840f7b8 Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Fri, 10 Feb 2023 09:16:35 -0700 Subject: [PATCH] fix(node): Update Proxy config port number --- packages/node/src/generators/application/application.spec.ts | 4 ++-- packages/node/src/generators/application/application.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/node/src/generators/application/application.spec.ts b/packages/node/src/generators/application/application.spec.ts index f204323c35a75..aa00bd216be60 100644 --- a/packages/node/src/generators/application/application.spec.ts +++ b/packages/node/src/generators/application/application.spec.ts @@ -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 }, }); }); diff --git a/packages/node/src/generators/application/application.ts b/packages/node/src/generators/application/application.ts index 65a8849f3463f..20333a3164d25 100644 --- a/packages/node/src/generators/application/application.ts +++ b/packages/node/src/generators/application/application.ts @@ -219,7 +219,7 @@ function addProxy(tree: Tree, options: NormalizedSchema) { JSON.stringify( { '/api': { - target: 'http://localhost:3333', + target: `http://localhost:${options.port}`, secure: false, }, }, @@ -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, }, };