port error
This commit is contained in:
lukas-heiligenbrunner 2019-12-13 16:26:53 +01:00
parent 3a82f81c1a
commit a1b3998890
7 changed files with 22 additions and 15 deletions

View File

@ -4,7 +4,7 @@
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="true" project-jdk-name="13" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -11,7 +11,7 @@ import java.io.IOException;
public class main {
public static void main(String[] args) {
Log.setLevel(Log.DEBUG);
Log.setLevel(Log.INFO);
Log.info("startup of WasteInformationServer");

View File

@ -10,6 +10,7 @@ import com.wasteinformationserver.website.datarequests.login.CheckLoginState;
import com.wasteinformationserver.website.datarequests.login.LoginRequest;
import java.io.IOException;
import java.net.BindException;
import java.net.InetSocketAddress;
@ -19,10 +20,6 @@ public class Webserver {
HttpServer server = null;
try {
server = HttpServer.create(new InetSocketAddress(8000), 0);
} catch (IOException e) {
e.printStackTrace();
}
server.createContext("/", new MainPage());
@ -36,6 +33,14 @@ public class Webserver {
server.setExecutor(null); // creates a default executor
server.start();
Log.info("Server available at http://127.0.0.1:8000 now");
}catch (BindException e){
Log.criticalerror("The Port 8000 is already in use!");
} catch (IOException e) {
e.printStackTrace();
}
/*

View File

@ -37,6 +37,8 @@
<link rel="stylesheet" type="text/css" href="css/dashboard.css">
<link rel="stylesheet" type="text/css" href="css/general.css">
<link rel="icon" type="image/png" href="/favicon.png">
</head>
<body class="hold-transition sidebar-mini layout-fixed">

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -7,7 +7,7 @@
"description": "A web app to manage waste pickups",
"icons": [
{
"src": "wasteicon.png",
"src": "favicon.png",
"sizes": "512x512",
"type": "image/png"
}

View File

@ -10,7 +10,7 @@ const staticAssets = [
'/lib/jquery.min.js',
'/lib/popper.min.js',
'/rsc/login2.jpg',
'/wasteicon.png'
'/favicon.png'
];
self.addEventListener('install', async e => {