Crow/examples/ssl/example_ssl.cpp
Luca Schlecker e5c7daccce remove every occurance of #define CROW_MAIN.
Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
2021-11-21 17:25:16 +01:00

27 lines
490 B
C++

#include "crow.h"
int main()
{
crow::SimpleApp app;
CROW_ROUTE(app, "/")
([]() {
return "Hello world!";
});
app.port(18080).ssl_file("test.crt", "test.key").run();
// Use .pem file
//app.port(18080).ssl_file("test.pem").run();
// Use custom context; see boost::asio::ssl::context
/*
* crow::ssl_context_t ctx;
* ctx.set_verify_mode(...)
*
* ... configuring ctx
*
* app.port(18080).ssl(ctx).run();
*/
}