fourier/src/main.cpp

29 lines
663 B
C++
Raw Normal View History

2024-09-12 22:12:19 +03:00
#include <Wt/WServer.h>
#include "MyApplication.h"
using namespace std;
using namespace Wt;
int main(int argc, char *argv[]) {
int code = 0;
try {
WServer server(argc, argv, WTHTTP_CONFIGURATION);
using namespace placeholders;
server.addEntryPoint( EntryPointType::Application,
[](const WEnvironment& env){return make_unique<MyApplication>(env);},
"/"
);
server.run();
}
catch ( WServer::Exception& e ) { cerr << e.what() << endl; code = -1; }
catch ( std::exception& e ) { cerr << "exception: " << e.what() << endl; code = -1; }
return code;
}