jhipster / jhipster-lite

JHipster Lite ⚡ is a development platform to generate, develop & deploy modern web applications & microservices architecture, step by step - using Hexagonal Architecture :gem:

Home Page:https://www.jhipster.tech/jhipster-lite/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server port on frontend clients and docs doesn't change from 8080 when property applied (React, Angular, ThemyLeaf, docs)

alerGeek opened this issue · comments

Overview

Frontend clients do not change the server when custom serverPort is added. The problem has been observed with Angular project, however after analyzing code it may exists for React and Thymeleaf as well.
Some frontend created files contains hardcoded path to localhost:8080
ie.

  • proxy.conf.json for Angular,
  • package.json for Thymeleaf,
  • vite.config.ts for React

as well as some properties/documentation files:

  • jwt-basic-auth.md
  • jhipster-realm.json

Motivation for or Use Case

It is a problem, as sometimes developer has some other application running on localhost:8080, and it is possible to send request to other, not related project.

Reproduce the error

This will be reproduction error for Angular project:

  1. Create project via https://lite.jhipster.tech/landscape with following modules:
  • "angular-core",
  • "init",
  • "prettier",
  • "spring-boot-mvc-empty",
  • "spring-boot",
  • "java-base",
  • "maven-java",
  • "spring-boot-tomcat",
  • "logs-spy"

Or from json I got from request:

{
	"modules": [
		"angular-core",
		"init",
		"prettier",
		"spring-boot-mvc-empty",
		"spring-boot",
		"java-base",
		"maven-java",
		"spring-boot-tomcat",
		"logs-spy"
	],
	"properties": {
		"commit": true,
		"parameters": {
			"baseName": "jhipsterSampleApplication",
			"configurationFormat": "yaml",
			"endOfLine": "lf",
			"indentSize": 2,
			"packageName": "com.mycompany.myapp",
			"projectName": "JHipster Sample Application",
			"serverPort": 9090
		},
		"projectFolder": "/tmp/1f1669e8-ccf4-4cb9-9f7e-9e4326357e5e"
	}
}
  1. Validate following files:
  • proxy.conf.json