Menu

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

Download this file

29 lines (25 with data), 470 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
#include <iostream>
#include <cppcms/manager.h>
#include <dbixx/dbixx.h>
#include "blog.h"
using namespace std;
using namespace cppcms;
int main(int argc,char **argv)
{
try{
manager app(argc,argv);
app.set_worker(new simple_factory<Blog>());
app.execute();
}
catch(cppcms_error &s) {
cerr<<s.what()<<endl;
return 1;
}
catch(dbixx::dbixx_error &e) {
cerr<<"dbi:"<<e.what()<<endl;
}
catch(std::exception &e) {
cerr<<e.what()<<endl;
}
return 0;
}
MongoDB Logo MongoDB