kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit f7190c8b12741c04b8fe6c6e402da6b1b004e706
parent a431f762639d587c4b141a5442cced7039608dbb
Author: Joris Vink <joris@coders.se>
Date:   Mon, 31 Mar 2014 11:28:06 +0200

Remove pgsql example from here, reset module.conf back to roots

Diffstat:
modules/example/module.conf | 8+++-----
modules/example/src/example.c | 25-------------------------
2 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/modules/example/module.conf b/modules/example/module.conf @@ -1,7 +1,7 @@ # Example Kore configuration # Server configuration. -bind 10.211.55.6 443 +bind 127.0.0.1 443 # The path worker processes will chroot into after starting. chroot /home/joris/src/kore @@ -43,7 +43,7 @@ workers 4 # (Set to 0 to disable sending this header). #http_header_max 4096 #http_postbody_max 10240000 -http_keepalive_time 0 +#http_keepalive_time 0 #http_hsts_enable 31536000 # Load modules (you can load multiple at the same time). @@ -142,13 +142,11 @@ authentication auth_example { # before allowing access to the page. # Example domain that responds to localhost. -domain kore.dev { +domain localhost { certfile cert/server.crt certkey cert/server.key accesslog /var/log/kore_access.log - static /pgsql serve_pgsql_test - # Page handlers with no authentication required. static /css/style.css serve_style_css static / serve_index diff --git a/modules/example/src/example.c b/modules/example/src/example.c @@ -16,7 +16,6 @@ #include "kore.h" #include "http.h" -#include "contrib/postgres/kore_pgsql.h" #include "static.h" @@ -33,7 +32,6 @@ int serve_validator(struct http_request *); int serve_params_test(struct http_request *); int serve_private(struct http_request *); int serve_private_test(struct http_request *); -int serve_pgsql_test(struct http_request *); void my_callback(void); int v_example_func(struct http_request *, char *); @@ -331,29 +329,6 @@ serve_private_test(struct http_request *req) return (KORE_RESULT_OK); } -int -serve_pgsql_test(struct http_request *req) -{ - //int r; - - KORE_PGSQL(req, "SELECT * FROM test", 0, { - if (req->pgsql[0]->state == KORE_PGSQL_STATE_ERROR) { - kore_log(LOG_NOTICE, "pgsql: %s", - (req->pgsql[0]->error) ? - req->pgsql[0]->error : "unknown"); - http_response(req, 500, "fail", 4); - return (KORE_RESULT_OK); - } else { - //r = kore_pgsql_ntuples(req, 0); - } - }); - - /* Query successfully completed */ - http_response(req, 200, "ok", 2); - - return (KORE_RESULT_OK); -} - void my_callback(void) {