Skip to content

Commit

Permalink
Revamped folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
noboomu committed Apr 7, 2017
1 parent 4a47da2 commit dac0df4
Show file tree
Hide file tree
Showing 48 changed files with 1,244 additions and 473 deletions.
7 changes: 7 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

615 changes: 615 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<logger name="io.netty" level="ERROR" />
<logger name="io.netty.handler" level="ERROR" />

<logger name="com.wurrly.server.swagger" level="ERROR" />
<logger name="com.wurrly.server.swagger" level="INFO" />

<logger name="com.relayrides" level="ERROR" />
<logger name="org.apache.activemq" level="ERROR" />
Expand Down
270 changes: 0 additions & 270 deletions src/com/wurrly/server/Extractors.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.google.common.util.concurrent.ServiceManager.Listener;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.name.Named;
import com.typesafe.config.Config;
import com.wurrly.controllers.Users;
import com.wurrly.modules.ConfigModule;
Expand All @@ -34,10 +33,8 @@
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.RoutingHandler;
import io.undertow.server.protocol.http2.Http2UpgradeHandler;
import io.undertow.util.Headers;
import static org.fusesource.jansi.Ansi.*;
import static org.fusesource.jansi.Ansi.Color.*;
import io.undertow.util.HttpString;
/**
* @author jbauer
*/
Expand Down Expand Up @@ -81,11 +78,7 @@ public void start()



Set<Service> services = registeredServices.stream().map( sc -> {

return injector.getInstance(sc);

}).collect(Collectors.toSet());
Set<Service> services = registeredServices.stream().map( sc -> injector.getInstance(sc)).collect(Collectors.toSet());

this.serviceManager = new ServiceManager(services);

Expand Down Expand Up @@ -138,7 +131,7 @@ public Undertow buildServer()

Set<RouteInfo> routingInfo = routingModule.getRegisteredRoutes(); //injector.getInstance(Key.get(new TypeLiteral<Set<RouteInfo>>() {},Names.named("routeInfo")));

routingInfo.stream().forEachOrdered( r -> sb.append(r.toString() + "\n"));
routingInfo.stream().forEachOrdered( r -> sb.append(r.toString()).append("\n"));

log.info("\n\nRegistered the following endpoints: \n\n" + sb.toString());

Expand All @@ -151,7 +144,7 @@ public Undertow buildServer()

.setSocketOption(org.xnio.Options.BACKLOG, 10000)
.setServerOption(UndertowOptions.RECORD_REQUEST_START_TIME, false)
.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, 1000000l * 200 )
.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, 1000000L * 200 )
.setWorkerThreads(Runtime.getRuntime().availableProcessors() * 8)
.setHandler( new HttpHandler()
{
Expand All @@ -166,9 +159,9 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception
// return;
// }

// exchange.getResponseHeaders().put(HttpString.tryFromString("Access-Control-Allow-Origin"), "*");
// exchange.getResponseHeaders().put(HttpString.tryFromString("Access-Control-Allow-Methods"), "GET, POST, DELETE, PUT, PATCH, OPTIONS");
// exchange.getResponseHeaders().put(HttpString.tryFromString("Access-Control-Allow-Headers"), "Content-Type, api_key, Authorization");
exchange.getResponseHeaders().put(HttpString.tryFromString("Access-Control-Allow-Origin"), "*");
exchange.getResponseHeaders().put(HttpString.tryFromString("Access-Control-Allow-Methods"), "*");
exchange.getResponseHeaders().put(HttpString.tryFromString("Access-Control-Allow-Headers"), "*");
exchange.getResponseHeaders().put(Headers.SERVER, "Bowser");

router.handleRequest(exchange);
Expand Down
Loading

0 comments on commit dac0df4

Please sign in to comment.