add: exercise answer for chapter 6 and 7

This commit is contained in:
Changkun Ou
2018-05-06 14:58:02 +02:00
parent d75f10db41
commit 70250c2b0a
11 changed files with 668 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//
// main_https.cpp
// web_server
// created by changkun at changkun.de/modern-cpp
//
#include <iostream>
#include "server.https.hpp"
#include "handler.hpp"
using namespace LabexWeb;
int main() {
// HTTPS server runs in port 12345, enable 4 threads
// Use certificates for security
Server<HTTPS> server(12345, 4, "server.crt", "server.key");
std::cout << "Server starting at port: 12345" << std::endl;
start_server<Server<HTTPS>>(server);
return 0;
}