mirror of https://github.com/rusefi/rusefi-1.git
refactoring
This commit is contained in:
parent
d08f2a4e0c
commit
ca03f9cf4d
|
@ -6,6 +6,7 @@ import org.takes.Take;
|
|||
import org.takes.facets.fork.FkRegex;
|
||||
import org.takes.facets.fork.TkFork;
|
||||
import org.takes.http.Exit;
|
||||
import org.takes.http.Front;
|
||||
import org.takes.http.FtBasic;
|
||||
import org.takes.misc.Href;
|
||||
import org.takes.rq.RqHref;
|
||||
|
@ -18,8 +19,7 @@ import javax.json.JsonObject;
|
|||
public class ServerSandbox {
|
||||
|
||||
public static void main(final String... args) throws Exception {
|
||||
new FtBasic(
|
||||
new TkFork(
|
||||
Take fork = new TkFork(
|
||||
new FkRegex("/list", new Take() {
|
||||
@Override
|
||||
public Response act(Request request) throws Exception {
|
||||
|
@ -40,10 +40,9 @@ public class ServerSandbox {
|
|||
}
|
||||
}),
|
||||
new FkRegex("/", "hello, world!")
|
||||
|
||||
|
||||
), 8080
|
||||
).start(Exit.NEVER);
|
||||
);
|
||||
Front ftBasic = new FtBasic(fork, 8080);
|
||||
ftBasic.start(Exit.NEVER);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue