From db779e8ef667b52adbd2e8729708e37b2d760a0c Mon Sep 17 00:00:00 2001 From: Lauro Correia Silveira Date: Tue, 19 Dec 2023 11:32:36 +0100 Subject: [PATCH] Added port configuration to deploy on railway (#80) --- .../infraestructure/railway/RailwayConfig.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/java/com/alura/aluraflixapi/infraestructure/railway/RailwayConfig.java diff --git a/src/main/java/com/alura/aluraflixapi/infraestructure/railway/RailwayConfig.java b/src/main/java/com/alura/aluraflixapi/infraestructure/railway/RailwayConfig.java new file mode 100644 index 0000000..913d972 --- /dev/null +++ b/src/main/java/com/alura/aluraflixapi/infraestructure/railway/RailwayConfig.java @@ -0,0 +1,13 @@ +package com.alura.aluraflixapi.infraestructure.railway; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class RailwayConfig { + + @Bean + String getPort(){ + return System.getenv("PORT"); + } +}