cc.protea.foundation.utility.ProfoundServer Maven / Gradle / Ivy
package cc.protea.foundation.utility;
import org.apache.commons.lang3.StringUtils;
import cc.protea.foundation.ProteaFoundation;
import cc.protea.foundation.webhooks.hello.HelloOAuthShimServlet;
public class ProfoundServer {
public static void start() throws Exception {
ProteaFoundation server = new ProteaFoundation();
for (String servicePackage : ProfoundConfiguration.servicePackages) {
server.addServicePackage(servicePackage);
}
server.addServicePackage("cc.protea.foundation.utility.providers");
server.addServicePackage("cc.protea.foundation.utility.services");
server.setSwaggerHost(StringUtils.removeEnd(ProfoundConfiguration.publicUrl, "/"));
for (String publicKey : ProfoundConfiguration.socialSecrets.keySet()) {
HelloOAuthShimServlet.addSecret(publicKey, ProfoundConfiguration.socialSecrets.get(publicKey));
}
server.start();
}
}