154{
155 Wt::WServer server(argc, argv, WTHTTP_CONFIGURATION);
157
158
159
160
161
162 server.addEntryPoint(Wt::EntryPointType::Application,
164 std::ref(chatServer)));
165 server.addEntryPoint(Wt::EntryPointType::WidgetSet,
167 std::ref(chatServer)), "/chat.js");
168
169 if (server.start()) {
170 int sig = Wt::WServer::waitForShutdown();
171 std::cerr << "Shutting down: (signal = " << sig << ")" << std::endl;
172 server.stop();
173 }
174}
std::unique_ptr< WApplication > createApplication(const WEnvironment &env)
std::unique_ptr< Wt::WApplication > createWidget(const Wt::WEnvironment &env, SimpleChatServer &server)