Refine the connection close

This commit is contained in:
Chunting Gu
2019-07-15 15:36:30 +08:00
parent 2a20030f7e
commit 46ea52cb90
24 changed files with 214 additions and 147 deletions
+4 -1
View File
@@ -1,3 +1,4 @@
#include "webcc/logger.h"
#include "webcc/response_builder.h"
#include "webcc/server.h"
@@ -13,12 +14,14 @@ public:
};
int main() {
WEBCC_LOG_INIT("", webcc::LOG_CONSOLE);
try {
webcc::Server server(8080);
server.Route("/", std::make_shared<HelloView>());
server.Run();
server.Start();
} catch (const std::exception&) {
return 1;