Menu

[r71]: / cms / trunk / main.cpp  Maximize  Restore  History

Download this file

43 lines (34 with data), 648 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include <memory>
#include "blog.h"
#include <cppcms/thread_pool.h>
#include <cppcms/global_config.h>
#include <cppcms/url.h>
#include <cppcms/templates.h>
#include "data.h"
using namespace std;
Templates_Set templates;
int main(int argc,char **argv)
{
try{
global_config.load(argc,argv);
db_initall();
db_openall();
templates.load();
Run_Application<Blog>(argc,argv);
db_closeall();
cout<<"Exiting\n";
}
catch(HTTP_Error &s) {
cerr<<s.get()<<endl;
db_closeall();
return 1;
}
catch(DbException &e) {
cerr<<e.what()<<endl;
}
catch(std::exception &e) {
cerr<<e.what()<<endl;
}
return 0;
}
MongoDB Logo MongoDB