refactor: use separate env vars for frontend/backend port

As we moved to a combined .env file for simplicity, frontend and backend need to be configured with separate variables.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2023-03-25 16:19:31 +01:00 committed by Tilman Vatteroth
parent 55f3bd9b60
commit f7f052fca1
6 changed files with 65 additions and 54 deletions

View file

@ -55,7 +55,7 @@ const schema = Joi.object({
.default(3000)
.max(65535)
.optional()
.label('PORT'),
.label('HD_BACKEND_PORT'),
loglevel: Joi.string()
.valid(...Object.values(Loglevel))
.default(Loglevel.WARN)
@ -79,7 +79,7 @@ export default registerAs('appConfig', () => {
{
baseUrl: process.env.HD_BASE_URL,
rendererBaseUrl: process.env.HD_RENDERER_BASE_URL,
port: parseOptionalNumber(process.env.PORT),
port: parseOptionalNumber(process.env.HD_BACKEND_PORT),
loglevel: process.env.HD_LOGLEVEL,
persistInterval: process.env.HD_PERSIST_INTERVAL,
},