Wt examples  3.3.0
main.C
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
3  *
4  * See the LICENSE file for terms of use.
5  */
6 
7 #include <Wt/WServer>
8 
9 #include "BlogRSSFeed.h"
10 #include "model/BlogSession.h"
11 #include "model/Token.h"
12 #include "model/User.h"
13 #include "WtHome.h"
14 #include "JWtHome.h"
15 
16 int main(int argc, char **argv)
17 {
18  try {
19  WServer server(argv[0]);
20 
21  server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
22 
23  BlogSession::configureAuth();
24 
25  BlogRSSFeed rssFeed(server.appRoot() + "blog.db", "Wt and JWt blog",
26  "http://www.webtoolkit.eu/wt/blog",
27  "We care about our webtoolkits.");
28 
29  server.addResource(&rssFeed, "/wt/blog/feed/");
30 
32  "/jwt", "/css/jwt/favicon.ico");
34  "", "/css/wt/favicon.ico");
35 
36  if (server.start()) {
37  WServer::waitForShutdown();
38  server.stop();
39  }
40  } catch (Wt::WServer::Exception& e) {
41  std::cerr << e.what() << std::endl;
42  } catch (std::exception &e) {
43  std::cerr << "exception: " << e.what() << std::endl;
44  }
45 }

Generated on Fri May 31 2013 for the C++ Web Toolkit (Wt) by doxygen 1.8.3.1