We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3478e9b commit 9f9bcdeCopy full SHA for 9f9bcde
microframeworks/pippo/pippo-hello/src/main/java/pippo/demo/AppMain.java
@@ -1,12 +1,16 @@
1
package pippo.demo;
2
3
+import java.util.Optional;
4
+
5
import ro.pippo.core.Pippo;
6
7
public class AppMain {
8
public static void main(String[] args) {
9
10
+ Optional<String> port = Optional.ofNullable(System.getenv("PORT"));
11
var pippo = new Pippo(new MyApplication());
12
pippo
13
.setFilterPath("/api/*")
- .start();
14
+ .start(Integer.parseInt(port.orElse("8080")));
15
}
16
0 commit comments