mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
28acb2c5a7
See #160 for more info.
28 lines
512 B
C++
28 lines
512 B
C++
#define CROW_MAIN
|
|
#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();
|
|
*/
|
|
}
|