int main(int argc, char * argv[]) { if(argc == 3){ WebServer<HttpRequest> wb = WebServer<HttpRequest>("127.0.0.1", 8080, atoi( argv[1]), atoi(argv[2]) ); wb.run(); } else{ WebServer<HttpRequest> wb = WebServer<HttpRequest>("127.0.0.1", 8080, 16, 10000); wb.run(); } }
int main(int argc, char* argv[]) { WebServer* server = new WebServer(); server->port = 8181; server->addController("/", new IndexController()); server->run(); delete server; return 0; }
int main( int argc, char* argv[] ) { Arc_InitCore(); Arc_InitNet(); Log::AddInfoOutput("stdout", false); Log::AddErrorOutput("stderr", false); Log::AddInfoOutput("logs/info.log"); Log::AddErrorOutput("logs/error.log"); WebServer server; server.run(); Log::CloseOutputs(); Arc_TermNet(); return 0; }