Skip to content

Commit

Permalink
Added port configuration to deploy on railway (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
LauroSilveira authored Dec 19, 2023
1 parent 3a8f0db commit 5a361a8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package com.alura.aluraflixapi.infraestructure.railway;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RailwayConfig {

@Value("server.port")
private String port;
@Bean
String getPort(){
return System.getenv("PORT");
return this.port = System.getenv("PORT");
}
}

0 comments on commit 5a361a8

Please sign in to comment.