io.higgs.http.server.demo.Demo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-s3 Show documentation
Show all versions of http-s3 Show documentation
Higgs HTTP S3 (Single Site Server)
package io.higgs.http.server.demo;
import io.higgs.core.HiggsServer;
import io.higgs.http.server.Transcription;
import io.higgs.http.server.config.HttpConfig;
import io.higgs.http.server.protocol.HttpProtocolConfiguration;
/**
* @author Courtney Robinson
*/
public class Demo {
private Demo() {
}
public static void main(String... args) {
HttpProtocolConfiguration http = new HttpProtocolConfiguration();
//re-write all requests to /app/* to index.html
http.getTranscriber().addTranscription(new Transcription("/app((?:\\/[\\w([^\\..]{1,4}\b)\\-]+)+)",
"/index.html"));
HiggsServer server = new HiggsServer().setConfig("config.yml", HttpConfig.class);
server.registerProtocol(http);
//
server.registerPackage(Api.class.getPackage());
// server.registerClass(Api.class);
// server.registerObject(new Api());
server.start();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy