CS代写 package scintilla;

package scintilla;
import static spark.Spark.*;

* Package only webserver, as to not expose it outside this package.

Copyright By PowCoder代写 加微信 powcoder

final class WebServer {
private String ipAddress = Environment.getIPAddress();
private int port = Environment.getPort();
private boolean isSecure = Environment.isSecure();

public void initialize() {
port(port);
ipAddress(ipAddress);

staticFiles.location(“/”);
staticFiles.header(“Access-Control-Allow-Origin”, “*”);
staticFiles.header(“Access-Control-Allow-Methods”, “*”);
staticFiles.header(“Access-Control-Allow-Headers”, “*”);

initExceptionHandler((e) -> {
System.err.println(“Exception ” + e.getMessage() + ” was raised”);
e.printStackTrace(System.err);

public void finalize() {
awaitInitialization();

public String getHostUrl() {
return (isSecure ? “https://” : “http://”) + ipAddress + “:” + port;

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com