Skip to content

Commit

Permalink
Add HikariCP2
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman3455 committed Jan 2, 2025
1 parent 7ed6afe commit 087debf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/hexlet/code/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public static Javalin getApp() throws IOException, SQLException {
return app;
}

public static int getPort() {
String port = System.getenv().getOrDefault("PORT", "7070");
return Integer.valueOf(port);
}

private static String getDatabaseUrl() {
return System.getenv().getOrDefault("JDBC_DATABASE_URL", "jdbc:h2:mem:project");
}
Expand All @@ -56,9 +61,4 @@ private static String readResourceFile(String fileName) throws IOException {
return reader.lines().collect(Collectors.joining("\n"));
}
}

public static int getPort() {
String port = System.getenv().getOrDefault("PORT", "7070");
return Integer.valueOf(port);
}
}

0 comments on commit 087debf

Please sign in to comment.