Better examples with SSL, build benchmarks

This commit is contained in:
Alex Hultman
2019-11-25 21:48:28 +01:00
parent 91a7a44eea
commit 02ad3979a6
5 changed files with 29 additions and 33 deletions
+7 -1
View File
@@ -1,8 +1,14 @@
#include "App.h"
/* Note that uWS::SSLApp({options}) is the same as uWS::App() when compiled without SSL support */
int main() {
/* Overly simple hello world app */
uWS::App().get("/*", [](auto *res, auto *req) {
uWS::SSLApp({
.key_file_name = "../misc/key.pem",
.cert_file_name = "../misc/cert.pem",
.passphrase = "1234"
}).get("/*", [](auto *res, auto *req) {
res->end("Hello world!");
}).listen(3000, [](auto *token) {
if (token) {