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