public class Main
{
public static void main(String[] args) throws Exception
{
Configuration config = loadEnvironment(args);
RestExpress server = new RestExpress()
.setName("RestExpress Benchmark")
.setExecutorThreadCount(config.getExecutorThreadPoolSize())
.alias("HelloWorld", HelloWorld.class);
server.uri("/restexpress/json", config.getJsonController())
.action("helloWorld", HttpMethod.GET);
server.uri("/restexpress/mysql", config.getMysqlController())
.method(HttpMethod.GET);
server.uri("/restexpress/mongodb", config.getMongodbController())
.method(HttpMethod.GET);
server.bind(config.getPort());
server.awaitShutdown();
}