Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c44a0dd9ec
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -4,7 +4,7 @@
|
|||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -11,7 +11,7 @@ import java.io.IOException;
|
|||||||
public class main {
|
public class main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
Log.setLevel(Log.DEBUG);
|
Log.setLevel(Log.INFO);
|
||||||
Log.info("startup of WasteInformationServer");
|
Log.info("startup of WasteInformationServer");
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import com.wasteinformationserver.website.datarequests.login.CheckLoginState;
|
|||||||
import com.wasteinformationserver.website.datarequests.login.LoginRequest;
|
import com.wasteinformationserver.website.datarequests.login.LoginRequest;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.BindException;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
|
|
||||||
@ -19,23 +20,27 @@ public class Webserver {
|
|||||||
HttpServer server = null;
|
HttpServer server = null;
|
||||||
try {
|
try {
|
||||||
server = HttpServer.create(new InetSocketAddress(8000), 0);
|
server = HttpServer.create(new InetSocketAddress(8000), 0);
|
||||||
|
|
||||||
|
server.createContext("/", new MainPage());
|
||||||
|
|
||||||
|
server.createContext("/senddata/loginget", new LoginRequest());
|
||||||
|
server.createContext("/senddata/registerpost", new RegisterRequest());
|
||||||
|
server.createContext("/senddata/checkloginstate", new CheckLoginState());
|
||||||
|
server.createContext("/senddata/wastedata", new DataRequest());
|
||||||
|
server.createContext("/senddata/admindata", new AdminRequests());
|
||||||
|
server.createContext("/senddata/newdate", new NewDateRequest());
|
||||||
|
|
||||||
|
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) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
server.createContext("/", new MainPage());
|
|
||||||
|
|
||||||
server.createContext("/senddata/loginget", new LoginRequest());
|
|
||||||
server.createContext("/senddata/registerpost", new RegisterRequest());
|
|
||||||
server.createContext("/senddata/checkloginstate", new CheckLoginState());
|
|
||||||
server.createContext("/senddata/wastedata", new DataRequest());
|
|
||||||
server.createContext("/senddata/admindata", new AdminRequests());
|
|
||||||
server.createContext("/senddata/newdate", new NewDateRequest());
|
|
||||||
|
|
||||||
server.setExecutor(null); // creates a default executor
|
|
||||||
server.start();
|
|
||||||
Log.info("Server available at http://127.0.0.1:8000 now");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="css/dashboard.css">
|
<link rel="stylesheet" type="text/css" href="css/dashboard.css">
|
||||||
<link rel="stylesheet" type="text/css" href="css/general.css">
|
<link rel="stylesheet" type="text/css" href="css/general.css">
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="/favicon.png">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="hold-transition sidebar-mini layout-fixed">
|
<body class="hold-transition sidebar-mini layout-fixed">
|
||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -7,7 +7,7 @@
|
|||||||
"description": "A web app to manage waste pickups",
|
"description": "A web app to manage waste pickups",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "wasteicon.png",
|
"src": "favicon.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ const staticAssets = [
|
|||||||
'/lib/jquery.min.js',
|
'/lib/jquery.min.js',
|
||||||
'/lib/popper.min.js',
|
'/lib/popper.min.js',
|
||||||
'/rsc/login2.jpg',
|
'/rsc/login2.jpg',
|
||||||
'/wasteicon.png'
|
'/favicon.png'
|
||||||
];
|
];
|
||||||
|
|
||||||
self.addEventListener('install', async e => {
|
self.addEventListener('install', async e => {
|
||||||
|
Loading…
Reference in New Issue
Block a user