From 5cd65c4cd90a370b765fbb6744802e42bf3fc9f6 Mon Sep 17 00:00:00 2001 From: Alex Hultman <3397140+alexhultman@users.noreply.github.com> Date: Fri, 28 Sep 2018 16:22:11 +0200 Subject: [PATCH] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d852e4c..e142ccf 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,10 @@ #### Express yourself briefly. ```c++ -uWS::App app; // or uWS::SSLApp(options) for SSL - -app.onGet("/", [](auto *res, auto *req, auto *args) { +uWS::SSLApp({ + .cert_file_name = "cert.pem", + .key_file_name = "key.pem" +}).onGet("/", [](auto *res, auto *req, auto *args) { /* Respond with the web app on default route */ res->writeStatus("200 OK") @@ -37,7 +38,7 @@ app.onGet("/", [](auto *res, auto *req, auto *args) { /* Remove websocket from this topic */ ws->unsubscribe("/chat"); -}).listen("localhost", 3000, 0); +}).listen("localhost", 3000, 0).run(); ``` #### Pay what you want.