public void start() {

        if (started) return;
        started = true;

        setPort(portNumber);

        enableCORS("*", "*", "*");

        Injector injector = Guice.createInjector(new MainModule());

        Controller controller = injector.getInstance(Controller.class);
        controller.publish();

        after((request, response) -> response.type("application/json"));

        exception(JsonSyntaxException.class, (e, request, response) -> {
            response.status(400);
            e.printStackTrace(); // TODO Log
            response.body("Malformed JSON : " + e.getCause().getMessage());
        });

        exception(NumberFormatException.class, (e, request, response) -> {
            response.status(400);
            e.printStackTrace(); // TODO Log
            response.body("Unsupported JSON Format : A number was expected " + e.getMessage());
        });

    }