mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Temporary printf()'s per db backend for main.
This commit is contained in:
parent
1fb86ff755
commit
4e2ef6f1e9
31
main.cpp
31
main.cpp
@ -1,23 +1,36 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "core/http_server.h"
|
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/file_cache.h"
|
#include "core/file_cache.h"
|
||||||
|
#include "core/http_server.h"
|
||||||
|
|
||||||
#include "rdn_application.h"
|
#include "rdn_application.h"
|
||||||
|
|
||||||
#define MAIN_CLASS RDNApplication
|
#define MAIN_CLASS RDNApplication
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
FileCache *file_cache = new FileCache(true);
|
|
||||||
file_cache->wwwroot = "./www";
|
|
||||||
file_cache->wwwroot_refresh_cache();
|
|
||||||
|
|
||||||
Application *app = new MAIN_CLASS();
|
#if MYSQL_PRESENT
|
||||||
|
printf("mysql present\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
app->setup_routes();
|
#if PGSQL_PRESENT
|
||||||
app->setup_middleware();
|
printf("pgsql present\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if SQLITE_PRESENT
|
||||||
|
printf("sqlite present\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FileCache *file_cache = new FileCache(true);
|
||||||
|
file_cache->wwwroot = "./www";
|
||||||
|
file_cache->wwwroot_refresh_cache();
|
||||||
|
|
||||||
|
Application *app = new MAIN_CLASS();
|
||||||
|
|
||||||
|
app->setup_routes();
|
||||||
|
app->setup_middleware();
|
||||||
|
|
||||||
HTTPServer *server = new HTTPServer();
|
HTTPServer *server = new HTTPServer();
|
||||||
|
|
||||||
@ -26,8 +39,8 @@ int main(int argc, char **argv) {
|
|||||||
server->main_loop();
|
server->main_loop();
|
||||||
|
|
||||||
delete server;
|
delete server;
|
||||||
delete app;
|
delete app;
|
||||||
delete file_cache;
|
delete file_cache;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user