Permalink
Browse files

Replaced restx-server-simple by restx-server-jetty in samplest since …

…restx-server-simple doesn't propagate exceptions occuring during route processing,

which makes debugging very hard (and seems things are not working at all).
With restx-server-jetty, when an exception is raised, it is displayed into the HTTP response body
  • Loading branch information...
fcamblor committed Jan 19, 2017
1 parent 85c11f2 commit e77f848bbdf383cf37711cf0c0572f6c85c2c92b
Showing with 7 additions and 3 deletions.
  1. +1 −1 restx-samplest/pom.xml
  2. +6 −2 restx-samplest/src/main/java/samplest/AppServer.java
View
@@ -49,7 +49,7 @@
</dependency>
<dependency>
<groupId>io.restx</groupId>
<artifactId>restx-server-simple</artifactId>
<artifactId>restx-server-jetty</artifactId>
</dependency>
<dependency>
<groupId>io.restx</groupId>
@@ -1,17 +1,21 @@
package samplest;
import com.google.common.base.Optional;
import restx.server.JettyWebServer;
import restx.server.WebServer;
import restx.server.simple.simple.SimpleWebServer;
//import restx.server.simple.simple.SimpleWebServer;
/**
* Date: 1/12/13
* Time: 14:18
*/
public class AppServer {
public static final String WEB_INF_LOCATION = "src/main/webapp/WEB-INF/web.xml";
public static final String WEB_APP_LOCATION = "src/main/webapp";
public static void main(String[] args) throws Exception {
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8080"));
WebServer server = SimpleWebServer.builder().setRouterPath("/api").setPort(port).build();
WebServer server = new JettyWebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
/*
* load mode from system property if defined, or default to dev

0 comments on commit e77f848

Please sign in to comment.