Menu

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

Download this file

42 lines (33 with data), 609 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
#include <iostream>
#include <memory>
#include "blog.h"
#include "thread_pool.h"
#include "global_config.h"
#include "url.h"
#include "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;
return 1;
}
catch(DbException &e) {
cerr<<e.what()<<endl;
}
catch(std::exception &e) {
cerr<<e.what()<<endl;
}
return 0;
}
MongoDB Logo MongoDB