Wt examples  3.3.0
Functions
main.C File Reference
#include <Wt/WServer>
#include "BlogRSSFeed.h"
#include "model/BlogSession.h"
#include "model/Token.h"
#include "model/User.h"
#include "WtHome.h"
#include "JWtHome.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 16 of file main.C.

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 
31  server.addEntryPoint(Application, createJWtHomeApplication,
32  "/jwt", "/css/jwt/favicon.ico");
33  server.addEntryPoint(Application, createWtHomeApplication,
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