21 auto createApp = [&](
const Wt::WEnvironment& env)->std::unique_ptr<Wt::WApplication> {
22 auto app = std::make_unique<WMainApp>(env);
29 std::string doc_root = getAssetPath() +
"docroot";
30 replace(doc_root.begin(), doc_root.end(),
'/',
'\\');
33 std::vector<std::string> args;
34 args.push_back(
"--http-listen");
35 args.push_back(
"0.0.0.0:5000");
36 args.push_back(
"--docroot");
37 args.push_back(doc_root);
38 args.push_back(
"--config");
39 args.push_back(doc_root +
"\\wt_config.xml");
40 Wt::log(
"warning") << doc_root +
"\\wt_config.xml";
41 Wt::WRun(
"", args, createApp);
46 server.addEntryPoint(Wt::EntryPointType::Application, createApp);
51 catch (Wt::WServer::Exception& e) {
52 std::cerr << e.what() <<
"\n";
55 catch (std::exception& e) {
56 std::cerr <<
"exception: " << e.what() <<
"\n";