Optimize code for example

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2017-11-12 15:11:39 +08:00
parent 7039de099d
commit 73c08a4bcf
1 changed files with 3 additions and 1 deletions

View File

@ -49,9 +49,11 @@ int main(int argc, char **argv)
goto err;
}
#if (UHTTP_SSL_ENABLED)
if (uh_ssl_init(srv, "server-cert.pem", "server-key.pem") < 0)
goto err;
#endif
uh_register_route(srv, "/test", route_test);
uh_log_info("Listen on 8000...\n");