Wt examples  3.2.3
/home/koen/project/wt/public-git/wt/examples/wt-homepage/main.C
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
00003  *
00004  * See the LICENSE file for terms of use.
00005  */
00006 
00007 #include <Wt/WServer>
00008 
00009 #include "BlogRSSFeed.h"
00010 #include "model/BlogSession.h"
00011 #include "model/Token.h"
00012 #include "model/User.h"
00013 #include "WtHome.h"
00014 #include "JWtHome.h"
00015 
00016 int main(int argc, char **argv)
00017 {
00018   try {
00019     WServer server(argv[0]);
00020 
00021     server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
00022 
00023     BlogSession::configureAuth();
00024 
00025     BlogRSSFeed rssFeed(server.appRoot() + "blog.db", "Wt and JWt blog",
00026       "http://www.webtoolkit.eu/wt/blog",
00027       "We care about our webtoolkits.");
00028 
00029     server.addResource(&rssFeed, "/wt/blog/feed/");
00030 
00031     server.addEntryPoint(Application, createJWtHomeApplication,
00032       "/jwt", "/css/jwt/favicon.ico");
00033     server.addEntryPoint(Application, createWtHomeApplication,
00034       "", "/css/wt/favicon.ico");
00035 
00036     if (server.start()) {
00037       WServer::waitForShutdown();
00038       server.stop();
00039     }
00040   } catch (Wt::WServer::Exception& e) {
00041     std::cerr << e.what() << std::endl;
00042   } catch (std::exception &e) {
00043     std::cerr << "exception: " << e.what() << std::endl;
00044   }
00045 }

Generated on Thu Nov 1 2012 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1