Skip to content

Commit

Permalink
Updated port
Browse files Browse the repository at this point in the history
  • Loading branch information
IliyanID committed Mar 22, 2023
1 parent 48515aa commit b25df1a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Back-End/src/main/java/com/tco/Server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ public Server()
}

private void configureRestfulApiServer() {
https = Service.ignite().port(443).threadPool(20);
http = Service.ignite().port(80).threadPool(10);
System.out.println("Server configured to listen on port 80 and 443");
int port = Integer.parseInt( System.getenv("PORT"));
if(!(port > 0)){
port = 3000;
}
http = Service.ignite().port(port).threadPool(10);
System.out.println("Server configured to listen on port " + port);

analytics = new Analytics();


String keyStoreLocation = new Config().getRootDirectory() + "/Back-End/src/main/resources/mykeystore.jks";
/*String keyStoreLocation = new Config().getRootDirectory() + "/Back-End/src/main/resources/mykeystore.jks";
String keyStorePassword = "password";
https.secure(keyStoreLocation, keyStorePassword, null, null);
https.secure(keyStoreLocation, keyStorePassword, null, null);*/

http.staticFiles.location("/public/build");

Expand Down

0 comments on commit b25df1a

Please sign in to comment.