#include <Wt/WServer.h>
#include <Wt/Dbo/SqlConnectionPool.h>
#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.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 19 of file main.C.
22 WServer server(argc, argv, WTHTTP_CONFIGURATION);
24 BlogSession::configureAuth();
26 std::unique_ptr<Dbo::SqlConnectionPool> blogDb
27 = BlogSession::createConnectionPool(server.appRoot() +
"blog.db");
29 auto rssFeed = std::make_shared<BlogRSSFeed>(*blogDb,
31 "http://www.webtoolkit.eu/wt/blog",
32 "We care about our webtoolkits.");
34 server.addResource(rssFeed,
"/wt/blog/feed/");
36 server.addEntryPoint(EntryPointType::Application,
38 "/jwt",
"/css/jwt/favicon.ico");
39 server.addEntryPoint(EntryPointType::Application,
41 "",
"/css/wt/favicon.ico");
46 std::cerr << e.
what() << std::endl;
47 }
catch (std::exception &e) {
48 std::cerr <<
"exception: " << e.what() << std::endl;
std::unique_ptr< WApplication > createJWtHomeApplication(const WEnvironment &env, Dbo::SqlConnectionPool *blogDb)
std::unique_ptr< WApplication > createWtHomeApplication(const WEnvironment &env, Dbo::SqlConnectionPool *blogDb)
virtual const char * what() const override