This commit is contained in:
Chunting Gu
2020-02-23 12:31:20 +08:00
parent 4ddf2d5696
commit 4386c46397
5 changed files with 8 additions and 24 deletions
+4 -2
View File
@@ -40,9 +40,11 @@ int main(int argc, const char* argv[]) {
LOG_USER("Sleep seconds: %d", sleep_seconds);
try {
webcc::Server server(8080);
webcc::Server server{ 8080 };
server.Route("/", std::make_shared<HelloView>(sleep_seconds));
auto view = std::make_shared<HelloView>(sleep_seconds);
server.Route("/", view);
server.Route("/hello", view);
server.Run(workers);